/* ========================================
   DESIGN SYSTEM — Samuel Batista Portfolio
   Palette: Monochrome + Blue Accent
   Typography: Space Grotesk + Archivo
   Style: Dark Glassmorphism + Motion
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Archivo:wght@300;400;500;600&display=swap');

/* --- Design Tokens --- */
:root {
  --color-bg: #0a0a0f;
  --color-bg-secondary: #111118;
  --color-surface: #16161d;
  --color-surface-hover: #1e1e28;
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(255, 255, 255, 0.12);
  --color-text: #f0f0f5;
  --color-text-secondary: #9494a8;
  --color-text-muted: #5a5a72;
  --color-accent: #3b82f6;
  --color-accent-hover: #60a5fa;
  --color-accent-glow: rgba(59, 130, 246, 0.25);
  --color-accent-subtle: rgba(59, 130, 246, 0.08);
  --color-success: #22c55e;
  --color-glass: rgba(22, 22, 29, 0.6);
  --color-glass-border: rgba(255, 255, 255, 0.08);

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Archivo', sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--color-accent-glow);

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-smooth: 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-elastic: 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* --- Preloader --- */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
}

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

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-text-muted);
  border-radius: 3px;
}

/* --- Background Effects --- */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.3s ease-out;
}

.bg-glow--blue {
  background: var(--color-accent);
  top: -200px;
  right: -100px;
}

.bg-glow--purple {
  background: #7c3aed;
  bottom: 30%;
  left: -200px;
  opacity: 0.08;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--color-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-glass-border);
  border-radius: 100px;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
  transition: box-shadow var(--transition-base);
}

.navbar:hover {
  box-shadow: var(--shadow-sm);
}

.navbar__logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.navbar__logo span {
  color: var(--color-accent);
}

.navbar__links {
  display: flex;
  list-style: none;
  gap: 24px;
}

.navbar__links a {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.navbar__links a:hover::after,
.navbar__links a.active::after {
  width: 100%;
  left: 0;
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--color-text);
}

.navbar__menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 4px;
}

/* --- Section Base --- */
.section {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section__label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section__label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 48px;
  color: var(--color-text);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.hero__content {
  max-width: 560px;
  flex-shrink: 0;
}

/* --- Hero Photo --- */
.hero__photo {
  position: relative;
  flex-shrink: 0;
  animation: float 6s ease-in-out infinite;
}

.hero__photo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
}

.hero__photo-frame {
  position: relative;
  z-index: 1;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--color-accent), #818cf8, var(--color-accent));
  background-size: 200% 200%;
  animation: gradient-spin 4s ease infinite;
}

.hero__photo-frame img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-bg);
  display: block;
}

@keyframes gradient-spin {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent-subtle);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-accent-hover);
  margin-bottom: 28px;
}

.hero__badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero__greeting {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  font-weight: 400;
  margin-bottom: 8px;
}

.hero__name {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 8px;
}

.hero__name .accent {
  background: linear-gradient(135deg, var(--color-accent), #818cf8, #c084fc, var(--color-accent));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer-text 6s ease-in-out infinite;
}

@keyframes shimmer-text {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero__role {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero__description {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  max-width: 540px;
  line-height: 1.8;
  margin-bottom: 40px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 28px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 16px var(--color-accent-glow);
  position: relative;
  overflow: hidden;
}

.btn--primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn--primary:hover::before {
  left: 100%;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px var(--color-accent-glow);
  color: #fff;
}

.btn--primary:active {
  transform: translateY(0) scale(0.98);
  transition: transform 100ms ease;
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.btn--ghost::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--color-accent-subtle);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.btn--ghost:hover::before {
  width: 300px;
  height: 300px;
}

.btn--ghost:hover {
  color: var(--color-text);
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
}

.btn--ghost:active {
  transform: translateY(0) scale(0.98);
  transition: transform 100ms ease;
}

/* --- About Section --- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about__text p {
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.8;
}

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-base);
}

.stat-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--shadow-md);
}

.stat-card:hover .stat-card__number {
  transform: scale(1.1);
  text-shadow: 0 0 20px var(--color-accent-glow);
}

.stat-card__number {
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.stat-card__number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card__label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --- Skills Section --- */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-smooth);
  cursor: pointer;
  position: relative;
}

.skill-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.skill-card:hover::after {
  opacity: 1;
}

.skill-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-glow);
}

.skill-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--color-accent);
  font-size: 1.25rem;
}

.skill-card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.skill-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.skill-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--color-accent-hover);
  border: 1px solid rgba(59, 130, 246, 0.12);
  transition: all 0.2s ease;
}

.tag:hover {
  background: rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* --- Soft Skills --- */
.soft-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.soft-skill-tag {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 100px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
  cursor: default;
}

.soft-skill-tag:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-hover);
  background: var(--color-accent-subtle);
  transform: translateY(-2px);
}

/* --- Featured Project --- */
.featured-project {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.featured-project + .featured-project {
  margin-top: 32px;
}

.featured-project::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), #818cf8, var(--color-accent));
  background-size: 200% 100%;
  animation: gradient-spin 4s ease infinite;
}

.featured-project:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-lg);
}

.featured-project__header {
  margin-bottom: 24px;
}

.featured-project__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  background: var(--color-accent-subtle);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 100px;
  padding: 4px 14px;
  margin-bottom: 12px;
}

.featured-project__title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.featured-project__subtitle {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.featured-project__content {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  margin-bottom: 24px;
}

.featured-project__desc p {
  color: var(--color-text-secondary);
  font-size: 0.925rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.featured-project__desc strong {
  color: var(--color-text);
}

.featured-project__features-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-text);
}

.featured-project__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.featured-project__list li {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  padding-left: 20px;
  position: relative;
}

.featured-project__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--color-accent);
  opacity: 0.6;
}

.featured-project__tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.featured-project__actions {
  display: flex;
  gap: 12px;
}

@media (max-width: 768px) {
  .featured-project__content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .featured-project {
    padding: 24px;
  }
}

/* --- First Project (Origin Story) --- */
.first-project {
  background: var(--color-surface);
  border: 1px dashed var(--color-border-hover);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  transition: all var(--transition-smooth);
}

.first-project:hover {
  border-color: var(--color-accent);
  border-style: solid;
}

.first-project__badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.first-project__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.first-project__desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
}

.first-project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.first-project__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.first-project__link:hover {
  color: var(--color-accent);
}

/* --- Experience / Timeline --- */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  border-radius: 1px;
}

.timeline__item {
  position: relative;
  padding-bottom: 48px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -36px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 0 4px var(--color-accent-glow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline__item:hover::before {
  transform: scale(1.5);
  box-shadow: 0 0 0 6px var(--color-accent-glow), 0 0 15px var(--color-accent-glow);
}

.timeline__date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 4px;
  font-family: var(--font-heading);
}

.timeline__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline__company {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.timeline__desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.timeline__bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.timeline__bullets li {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  padding-left: 18px;
  position: relative;
}

.timeline__bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 0.8rem;
}

.timeline__bullets li strong {
  color: var(--color-text);
}

.timeline__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* --- Projects Section --- */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-smooth);
  cursor: pointer;
}

.project-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.project-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--color-surface), var(--color-bg-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.project-card__body {
  padding: 24px;
}

.project-card__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-card__tech {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.project-card__link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.project-card__link:hover {
  color: var(--color-accent-hover);
}

/* --- Contact Section --- */
.contact__cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: all var(--transition-smooth);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), #818cf8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-card:hover::before {
  transform: scaleX(1);
}

.contact-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-glow);
}

.contact-card:hover svg {
  animation: contact-icon-bounce 0.5s var(--transition-spring);
}

@keyframes contact-icon-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.3) rotate(-5deg); }
  70% { transform: scale(0.9) rotate(3deg); }
  100% { transform: scale(1) rotate(0); }
}

.contact-card svg {
  color: var(--color-accent);
  flex-shrink: 0;
}

.contact-card__label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.contact-card__value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
}



/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  padding: 48px 24px 24px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  max-width: 1100px;
  margin: 0 auto;
}

.footer__content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 32px;
}

.footer__brand {
  flex-shrink: 0;
}

.footer__logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.footer__logo-dot {
  color: var(--color-accent);
}

.footer__tagline {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-top: 6px;
  font-style: italic;
  line-height: 1.5;
}

.footer__nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__nav a {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer__nav a:hover {
  color: var(--color-accent);
}

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

.footer__social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
}

.footer__social a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-accent-subtle);
  transform: translateY(-2px);
}

.footer__bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .footer__content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer__nav {
    justify-content: center;
  }
}

/* --- Scroll Indicator --- */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: scroll-fade-in 1s ease 1.5s both;
  transition: opacity 0.4s ease;
}

.scroll-indicator__mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--color-text-muted);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-indicator__wheel {
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: var(--color-accent);
  animation: scroll-wheel 2s ease-in-out infinite;
}

.scroll-indicator__text {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
}

@keyframes scroll-wheel {
  0% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.3; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes scroll-fade-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* --- Project Title Icons --- */
.featured-project__title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.featured-project__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-accent-subtle);
  border: 1px solid rgba(59, 130, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.featured-project:hover .featured-project__icon {
  transform: scale(1.1) rotate(-3deg);
  box-shadow: 0 0 20px var(--color-accent-glow);
}

.featured-project__icon--green {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.featured-project__icon--purple {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.featured-project__icon--amber {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.featured-project__icon--cyan {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}

/* --- Certification Cards --- */
.certifications__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.cert-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-smooth);
}

.cert-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.cert-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
  flex-shrink: 0;
}

.cert-card__content {
  flex: 1;
}

.cert-card__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.cert-card__desc {
  font-size: 0.825rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.cert-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 100px;
  padding: 4px 12px;
}

.cert-card__status svg {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* --- Contact Grid 5 cards adjustment --- */
.contact__cards {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 900px) {
  .contact__cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .contact__cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  .contact__cards {
    grid-template-columns: 1fr;
  }
}

/* --- Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Reveal Variants --- */
.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  filter: blur(4px);
  transition: opacity 0.6s ease, transform 0.6s var(--transition-spring, 500ms cubic-bezier(0.34, 1.56, 0.64, 1)), filter 0.6s ease;
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.reveal-rotate {
  opacity: 0;
  transform: translateY(30px) rotate(-3deg);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-rotate.revealed {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

/* --- Staggered Children --- */
.stagger-children .reveal,
.stagger-children .reveal-left,
.stagger-children .reveal-right,
.stagger-children .reveal-scale,
.stagger-children .reveal-rotate {
  transition-delay: calc(var(--stagger-index, 0) * 100ms);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* --- Pulse glow on featured projects --- */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 var(--color-accent-glow); }
  50% { box-shadow: 0 0 20px 4px var(--color-accent-glow); }
}

.featured-project__badge {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* --- Mobile Nav Overlay --- */
.mobile-nav {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-nav.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav a {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast), transform 0.4s ease, opacity 0.4s ease;
  opacity: 0;
  transform: translateY(20px);
}

.mobile-nav.open a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav.open a:nth-child(2) { transition-delay: 0.05s; }
.mobile-nav.open a:nth-child(3) { transition-delay: 0.1s; }
.mobile-nav.open a:nth-child(4) { transition-delay: 0.15s; }
.mobile-nav.open a:nth-child(5) { transition-delay: 0.2s; }
.mobile-nav.open a:nth-child(6) { transition-delay: 0.25s; }

.mobile-nav a:hover {
  color: var(--color-accent);
}

.mobile-nav__close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.mobile-nav__close:hover {
  transform: rotate(90deg);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .navbar__links {
    display: none;
  }

  .navbar__menu-btn {
    display: block;
  }

  .hero {
    padding: 100px 20px 60px;
    flex-direction: column-reverse;
    text-align: center;
    gap: 32px;
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__name {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .hero__description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__photo-frame {
    width: 200px;
    height: 200px;
  }

  .hero__photo-glow {
    width: 240px;
    height: 240px;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .skills__grid {
    grid-template-columns: 1fr;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .contact__wrapper {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 60px 20px;
  }
}

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

  .hero__badge .dot {
    animation: none;
  }
}

/* --- Cursor Glow --- */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.cursor-glow.active {
  opacity: 0.5;
}

/* --- Theme Toggle --- */
.theme-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-accent-subtle);
}

.theme-toggle__icon--moon {
  display: none;
}

[data-theme="light"] .theme-toggle__icon--sun {
  display: none;
}

[data-theme="light"] .theme-toggle__icon--moon {
  display: block;
}

/* --- Hero Cascade Animation --- */
.hero-animate__item {
  opacity: 0;
  transform: translateY(24px);
  animation: hero-fade-in 0.7s ease forwards;
}

.hero-animate__item:nth-child(1) { animation-delay: 0.1s; }
.hero-animate__item:nth-child(2) { animation-delay: 0.2s; }
.hero-animate__item:nth-child(3) { animation-delay: 0.35s; }
.hero-animate__item:nth-child(4) { animation-delay: 0.5s; }
.hero-animate__item:nth-child(5) { animation-delay: 0.6s; }
.hero-animate__item:nth-child(6) { animation-delay: 0.7s; }

.hero__photo.hero-animate__item {
  animation-delay: 0.4s;
}

@keyframes hero-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--color-accent-glow);
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-base);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--color-accent-hover);
  transform: translateY(-4px);
}

/* --- Light Theme --- */
[data-theme="light"] {
  --color-bg: #f8f9fc;
  --color-bg-secondary: #eef0f5;
  --color-surface: #ffffff;
  --color-surface-hover: #f0f2f7;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-hover: rgba(0, 0, 0, 0.15);
  --color-text: #1a1a2e;
  --color-text-secondary: #555570;
  --color-text-muted: #8888a0;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-glow: rgba(37, 99, 235, 0.2);
  --color-accent-subtle: rgba(37, 99, 235, 0.06);
  --color-glass: rgba(255, 255, 255, 0.7);
  --color-glass-border: rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

[data-theme="light"] .bg-glow { opacity: 0.06; }
[data-theme="light"] .cursor-glow { opacity: 0; }
[data-theme="light"] .hero__photo-frame img { border-color: var(--color-bg); }
