@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #faf8f6;
  --bg-secondary: #f3efe9;
  --surface-primary: #ffffff;
  --surface-secondary: #f8f5f0;
  --accent: #f59e0b;
  --accent-rgb: 245, 158, 11;
  --accent-deep: #d97706;
  --accent-light: #f0d361;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(245, 158, 11, 0.2);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Poppins', sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

[data-theme="dark"] {
  --bg-primary: #0b1120;
  --bg-secondary: #111827;
  --surface-primary: #1e293b;
  --surface-secondary: #1e293b;
  --accent: #fbbf24;
  --accent-rgb: 251, 191, 36;
  --accent-deep: #f59e0b;
  --accent-light: #451a03;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(251, 191, 36, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* ===== Grid Background ===== */

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.12) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridShift 5s linear infinite;
  transition: background-image 1s ease;
}

@keyframes gridShift {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 50px 50px;
  }
}

#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle,
      rgba(var(--accent-rgb), 0.12) 0%,
      rgba(var(--accent-rgb), 0.05) 25%,
      transparent 60%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  will-change: transform;
}

[data-theme="dark"] #cursor-glow {
  background: radial-gradient(circle,
      rgba(var(--accent-rgb), 0.18) 0%,
      rgba(var(--accent-rgb), 0.08) 25%,
      transparent 60%);
}

#cursor-glow.hidden {
  opacity: 0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

/* ===== Typography ===== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
}

section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.section-header {
  margin-bottom: 3rem;
}

.section-rule {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  margin-top: 0.75rem;
  border-radius: 2px;
}

p {
  font-weight: 400;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ===== Decorative Ornaments ===== */

.decorative-amp {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 8rem;
  color: var(--accent);
  opacity: 0.1;
  line-height: 1;
  user-select: none;
  position: absolute;
  right: 0;
  bottom: 0;
  transform: translateY(30%);
}

/* ===== Glassmorphism ===== */

.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

[data-theme="dark"] .glass {
  background: rgba(11, 17, 32, 0.85);
}

/* ===== Layout ===== */

.section {
  padding: 120px 32px;
  max-width: 1360px;
  margin: 0 auto;
}

.hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 100vh;
  text-align: left;
  gap: 60px;
  padding-top: 80px;
  position: relative;
  z-index: 1;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-name {
  font-size: 5rem;
  background: linear-gradient(135deg,
      var(--text-primary) 0%,
      var(--accent) 50%,
      var(--accent-deep) 100%);
  background-size: 200% 200%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: background-position 0.5s ease, text-shadow 0.5s ease;
  position: relative;
  display: inline-block;
}

.hero-name:hover {
  background-position: 100% 50%;
  text-shadow: 0 0 40px rgba(var(--accent-rgb), 0.3);
}

.hero-subtitle {
  font-size: 1.25rem;
  min-height: 1.5em;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-top: 16px;
}

.typewriter {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.3);
}

.typewriter::after {
  content: '|';
  animation: cursorBlink 1s step-end infinite;
  color: var(--accent);
  font-weight: 700;
  margin-left: 2px;
  text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.3);
}

/* ===== Navbar ===== */

.navbar {
  position: fixed;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  min-height: 68px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  border-bottom: 1px solid transparent;
  gap: 16px;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .navbar.scrolled {
  background: rgba(11, 17, 32, 0.92);
}

.navbar.transparent {
  background: transparent;
  border-bottom: 1px solid transparent;
  box-shadow: none;
}

.nav-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s ease;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.35s ease;
}

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

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after {
  width: 100%;
}

/* ===== Theme Toggle ===== */

.theme-toggle {
  background: var(--surface-primary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.35s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.15);
  transform: translateY(-1px);
}

.theme-toggle .icon-sun {
  display: block;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* ===== Hamburger Menu ===== */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Buttons ===== */

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border: 1.5px solid var(--border-color);
  border-radius: 50px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.05em;
  transition: all 0.35s ease;
  background: transparent;
}

.social-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.1);
  transform: translateY(-2px);
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--accent);
  border: 1.5px solid var(--accent);
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-top: 24px;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.contact-btn:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.25);
}

.project-btn {
  padding: 10px 28px;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.project-btn:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3);
}

/* ===== Profile Image ===== */

.profile-img-wrapper {
  position: relative;
  width: min(55vw, 55vh, 600px);
  height: min(55vw, 55vh, 600px);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-img-wrapper::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 28px;
  border: 2px solid var(--border-color);
  transition: border-color 0.4s ease;
}

.profile-img-wrapper::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 34px;
  border: 1px solid var(--border-color);
}

.profile-img-wrapper:hover::before {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.15);
}

.profile-img {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.profile-img-wrapper:hover .profile-img {
  transform: scale(1.06);
}

/* ===== About ===== */

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
  margin-top: 20px;
  position: relative;
}

.about-text p {
  margin-bottom: 1.2rem;
}

.about-text p:first-child {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 400;
}

.about-accent {
  width: 100%;
  min-height: 300px;
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.06), rgba(var(--accent-rgb), 0.01));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.about-accent::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.08), transparent);
  top: -40px;
  right: -40px;
}

.about-accent::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 50%;
  bottom: 20px;
  left: 20px;
}

/* ===== Cards ===== */

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 1.2rem;
  color: var(--accent);
  transition: all 0.35s ease;
  background: rgba(var(--accent-rgb), 0.04);
}

.expertise-card:hover .card-icon,
.service-card:hover .card-icon {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  transform: translateY(-2px);
}

.expertise-card h3,
.service-card h3,
.project-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.expertise-card,
.service-card,
.project-card {
  padding: 32px;
  background: var(--surface-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}

.expertise-card:hover,
.service-card:hover,
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(var(--accent-rgb), 0.05);
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 20px;
}

/* ===== Timeline ===== */

.timeline {
  position: relative;
  padding: 20px 0;
  margin-top: 20px;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent) 5%, var(--accent) 90%, transparent);
  transform: translateX(-50%);
  opacity: 0.3;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 64px;
  position: relative;
}

.timeline-item.right {
  padding-left: calc(50% + 36px);
}

.timeline-item.left {
  padding-right: calc(50% + 36px);
  text-align: right;
}


.timeline-dot {
  position: absolute;
  left: 50%;
  top: 18px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 1;
  border: 4px solid var(--bg-primary);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2);
  transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  transform: translateX(-50%) scale(1.5);
}

.timeline-card {
  background: var(--surface-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 48px;
  width: 100%;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.timeline-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.timeline-school {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 400;
}

.timeline-year {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 12px;
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.15);
  border-radius: 6px;
  background: rgba(var(--accent-rgb), 0.04);
}

.timeline-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 12px;
}

/* ===== Projects ===== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.project-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.project-image {
  width: 100%;
  height: 200px;
  background: var(--surface-secondary);
  background-image:
    repeating-linear-gradient(45deg,
      transparent,
      transparent 8px,
      rgba(var(--accent-rgb), 0.03) 8px,
      rgba(var(--accent-rgb), 0.03) 16px);
}

.project-image.sis {
  background-image: url('../assets/sis-bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.project-image.portfl {
  background-image: url('../assets/img-portfolio.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.project-image.notino {
  background-image: url('../assets/img-notino.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.project-image.ecomm {
  background-image: url('../assets/img-ecomm.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.project-image.trimy {
  background-image: url('../assets/img-trimy.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.project-image.ksb-systems {
  background-image: url('../assets/img-ksbsystems.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.project-info {
  padding: 24px;
  flex: 1;
}

.project-info p {
  font-size: 0.9rem;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(var(--accent-rgb), 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

/* ===== Contact ===== */

#contact {
  position: relative;
  overflow: hidden;
}

.contact-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: glowBreathe 6s ease-in-out infinite;
}

.contact-card {
  background: var(--surface-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  box-shadow: var(--shadow-md);
}

.contact-card h2 {
  margin-bottom: 0;
}

.contact-card p {
  margin-top: 16px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Contact Form ===== */

.contact-form {
  margin-top: 32px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 14px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--accent);
  border: 1.5px solid var(--accent);
  color: #ffffff;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.35s ease;
  width: 100%;
  margin-top: 4px;
}

.submit-btn:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.25);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  font-size: 0.9rem;
  margin-top: 16px;
  text-align: center;
  min-height: 1.4em;
}

.form-status.success {
  color: #16a34a;
}

.form-status.error {
  color: #dc2626;
}

[data-theme="dark"] .form-status.success {
  color: #4ade80;
}

[data-theme="dark"] .form-status.error {
  color: #f87171;
}

/* ===== Footer ===== */

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 48px 32px 32px;
  margin-top: 40px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  background: var(--surface-primary);
}

[data-theme="dark"] footer {
  background: var(--surface-secondary);
}

footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}

footer .social-links {
  display: flex;
  gap: 16px;
}

footer .social-btn {
  padding: 8px 20px;
  font-size: 0.8rem;
}

/* ===== Certificates ===== */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.cert-card {
  background: var(--surface-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}

.cert-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(var(--accent-rgb), 0.05);
}

.cert-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.cert-card:hover .cert-image img {
  transform: scale(1.06);
}

.cert-info {
  padding: 20px 24px 24px;
}

.cert-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 4px;
  padding: 3px 10px;
  margin-bottom: 10px;
  background: rgba(var(--accent-rgb), 0.05);
}

.cert-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

/* ===== Modal ===== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 32px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--surface-primary);
  border-radius: var(--radius-md);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.35s ease;
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  gap: 16px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-controls {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.modal-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
}

.modal-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}

.modal-btn.modal-close:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.06);
}

[data-theme="dark"] .modal-btn.modal-close:hover {
  border-color: #f87171;
  color: #f87171;
}

.modal-body {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 300px;
  cursor: grab;
}

.modal-body:active {
  cursor: grabbing;
}

.modal-body img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  transition: transform 0.2s ease;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

/* ===== Animation Keyframes ===== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(24px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes cursorBlink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

@keyframes glowBreathe {

  0%,
  100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* ===== Staggered Children ===== */

[data-stagger]>* {
  opacity: 0;
}

[data-stagger].visible>*,
[data-stagger].staggered>* {
  animation: slideUp 0.6s ease forwards;
}

[data-stagger]>*:nth-child(1) {
  animation-delay: 0.1s;
}

[data-stagger]>*:nth-child(2) {
  animation-delay: 0.2s;
}

[data-stagger]>*:nth-child(3) {
  animation-delay: 0.3s;
}

[data-stagger]>*:nth-child(4) {
  animation-delay: 0.4s;
}

[data-stagger]>*:nth-child(5) {
  animation-delay: 0.5s;
}

[data-stagger]>*:nth-child(6) {
  animation-delay: 0.6s;
}

[data-stagger]>*:nth-child(7) {
  animation-delay: 0.7s;
}

[data-stagger]>*:nth-child(8) {
  animation-delay: 0.8s;
}

[data-stagger]>*:nth-child(9) {
  animation-delay: 0.9s;
}

[data-stagger]>*:nth-child(10) {
  animation-delay: 1.0s;
}

/* ===== Section Reveal ===== */

.section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== AID Chat Bubble ===== */

.chat-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.chat-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(var(--accent-rgb), 0.45);
}

.chat-bubble:active {
  transform: scale(0.95);
}

.chat-bubble .chat-bubble-close-icon {
  display: none;
}

.chat-bubble.open .chat-bubble-icon {
  display: none;
}

.chat-bubble.open .chat-bubble-close-icon {
  display: block;
}

/* ===== AID Chat Drawer ===== */

.chat-drawer {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 400px;
  max-height: 500px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}

[data-theme="dark"] .chat-drawer {
  background: rgba(11, 17, 32, 0.92);
}

.chat-drawer.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* -- Header -- */

.chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(var(--accent-rgb), 0.04);
}

.chat-header-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.chat-header-subtitle {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
  flex: 1;
}

.chat-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--surface-primary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.chat-close:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.06);
}

[data-theme="dark"] .chat-close:hover {
  border-color: #f87171;
  color: #f87171;
}

/* -- Messages -- */

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: fadeInUp 0.3s ease;
}

.chat-message.user {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-message.aid {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble-text {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  word-wrap: break-word;
}

.chat-message.user .chat-bubble-text {
  background: var(--accent);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-message.aid .chat-bubble-text {
  background: var(--surface-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
}

.chat-source {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 4px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.chat-message.user .chat-source {
  display: none;
}

/* -- Typing Indicator -- */

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
  background: var(--surface-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* -- Input -- */

.chat-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: rgba(var(--accent-rgb), 0.02);
}

.chat-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-primary);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}

.chat-send:hover {
  background: var(--accent-deep);
  transform: scale(1.06);
}

.chat-send:active {
  transform: scale(0.94);
}

/* ===== Chat Responsive ===== */

@media (max-width: 767px) {
  .chat-bubble {
    bottom: 16px;
    right: 16px;
  }

  .chat-drawer {
    bottom: 0;
    right: 0;
    width: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
  }

  .chat-messages {
    padding: 12px 16px;
  }

  .chat-input-wrapper {
    padding: 10px 12px;
  }

  .chat-bubble-text {
    font-size: 0.85rem;
    padding: 8px 14px;
  }
}

/* ===== Tablet (768px-1023px) ===== */

@media (max-width: 1023px) {
  .navbar {
    padding: 0 20px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--bg-primary);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
  }

  .nav-links.active {
    display: flex;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  .hero-content {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-name {
    font-size: 3.2rem;
  }

  .about-grid,
  .expertise-grid,
  .services-grid,
  .projects-grid,
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    gap: 40px;
  }

  section h2 {
    font-size: 2rem;
  }

  .section {
    padding: 80px 24px;
  }

  .profile-img-wrapper {
    width: min(50vw, 50vh, 480px);
    height: min(50vw, 50vh, 480px);
    border-radius: 20px;
  }

  .profile-img-wrapper::before {
    border-radius: 24px;
  }

  .profile-img-wrapper::after {
    border-radius: 30px;
  }

  .profile-img {
    border-radius: 20px;
  }

  .timeline-item {
    flex-direction: column;
  }

  .timeline-item.right,
  .timeline-item.left {
    padding: 0 0 0 32px;
    text-align: left;
  }

  .timeline-line {
    left: 7px;
  }

  .timeline-dot {
    left: 7px;
  }

  .decorative-amp {
    font-size: 5rem;
    position: relative;
    margin-top: 2rem;
  }

  .about-accent {
    min-height: 200px;
  }

  .modal-overlay {
    padding: 16px;
  }

  .modal-body {
    padding: 16px;
    min-height: 200px;
  }

  .modal-header {
    padding: 12px 16px;
  }

  .modal-title {
    font-size: 0.9rem;
  }
}

/* ===== Mobile (<768px) ===== */

@media (max-width: 767px) {
  .hero-name {
    font-size: 2.8rem;
  }

  section h2 {
    font-size: 1.6rem;
  }

  .section {
    padding: 60px 16px;
  }

  .hero {
    box-sizing: border-box;
    min-height: 100vh;
    gap: 12px;
    justify-content: center;
    align-items: center;
    padding: 68px 16px;
  }

  .profile-img-wrapper {
    order: -1;
    width: min(60vw, 60vh, 360px);
    height: min(60vw, 60vh, 360px);
    border-radius: 16px;
  }

  .profile-img-wrapper::before {
    border-radius: 20px;
  }

  .profile-img-wrapper::after {
    border-radius: 26px;
  }

  .profile-img {
    border-radius: 16px;
  }

  .expertise-card,
  .service-card,
  .project-card {
    padding: 24px;
  }

  .timeline-dot {
    width: 12px;
    height: 12px;
  }

  .contact-card {
    padding: 40px 24px;
  }

  .cert-info {
    padding: 16px 20px 20px;
  }

  .cert-info h3 {
    font-size: 0.9rem;
  }

  .cert-badge {
    font-size: 0.65rem;
  }

  .modal-overlay {
    padding: 8px;
  }

  .modal-body {
    padding: 12px;
    min-height: 150px;
  }

  .form-group input,
  .form-group textarea {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  .submit-btn {
    padding: 14px 28px;
    font-size: 0.9rem;
  }

  .about-grid {
    gap: 24px;
  }

  .about-accent {
    min-height: 150px;
  }

  .about-text p:first-child {
    font-size: 1rem;
  }

  .contact-btn {
    padding: 14px 28px;
    font-size: 0.9rem;
  }

  .decorative-amp {
    font-size: 3.5rem;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .typewriter {
    font-size: 1.2rem;
  }
}