/* =========================================================================
   Portfolio styles — Desmond Chua
   Layered on top of the theme's compiled main.css (which provides
   normalize, Font Awesome 4 icon classes, and devicon fonts).
   ========================================================================= */

:root {
  --color-bg: #f6f0e8;
  --color-bg-soft: #ede4d6;
  --color-card: #ffffff;
  --color-card-soft: #f9f2e8;
  --color-text: #2a2530;
  --color-text-muted: #6c6573;
  --color-text-soft: #8c8593;
  --color-border: rgba(80, 60, 80, 0.12);
  --color-border-soft: rgba(80, 60, 80, 0.08);
  --color-accent: #7b2d5e;
  --color-accent-soft: #a55a8a;
  --color-accent-bg: rgba(123, 45, 94, 0.08);
  --color-amber: #e08e2b;
  --color-green: #2f8a43;
  --color-gray-dot: #9a9099;
  --shadow-card: 0 1px 2px rgba(40, 25, 55, 0.04), 0 8px 24px rgba(40, 25, 55, 0.06);
  --radius-card: 14px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset overrides from the theme's _base.scss */
html, body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

* { box-sizing: border-box; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  font-weight: 600;
  line-height: 1.3;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

/* =========================================================================
   HERO — particle background with gradient
   ========================================================================= */

#particles-js.portfolio-hero {
  position: relative;
  width: 100%;
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  background: linear-gradient(160deg,
    #2d0547 0%,
    #6a0f7a 25%,
    #880e4f 60%,
    #b71c1c 100%);
  background-attachment: fixed;
  overflow: hidden;
}

#particles-js.portfolio-hero canvas.particles-js-canvas-el {
  position: absolute !important;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 0 1.5rem !important;
  margin: 0 auto !important;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-name {
  font-size: 4.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  margin: 0 0 10px 0;
  padding: 0;
  line-height: 1.05;
}

@media (max-width: 600px) {
  .hero-name { font-size: 2.75rem; letter-spacing: 1px; }
}

.hero-location {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
  margin: 0 0 16px 0;
}

.hero-location .fa-map-marker {
  margin-right: 6px;
  font-size: 0.85rem;
}

.hero-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px 0;
}

.role-pill {
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 25px;
  padding: 8px 22px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  display: inline-block;
  margin: 0 5px;
  white-space: nowrap;
}

.hero-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 0 0 8px 0;
}

.social-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  text-decoration: none;
}

.social-btn:hover,
.social-btn:focus {
  background-color: rgba(255, 255, 255, 0.95);
  color: #2a2530;
  border-color: rgba(255, 255, 255, 0.95);
  outline: none;
  transform: translateY(-2px);
}

.hero-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.85);
}

.hero-nav-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 4px 6px;
  letter-spacing: 3px;
  transition: color 0.2s ease;
}

.hero-nav-link:hover { color: #fff; }

.hero-nav-dot {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
  letter-spacing: 0;
}

.hero-down {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  z-index: 3;
  text-decoration: none;
  animation: hero-bounce 1.8s ease-in-out infinite;
}

.hero-down:hover { color: #fff; }

@keyframes hero-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, -6px); }
}

/* =========================================================================
   SECTIONS — shared
   ========================================================================= */

.section {
  padding: 3.25rem 1.5rem;
  position: relative;
}

/* Override the legacy theme's #about / #projects width caps so every
   section spans the full viewport — content is constrained by the inner
   wrapper, not by the section element itself. */
section.section,
#about, #projects, #practice, #certifications {
  width: 100% !important;
  max-width: none !important;
}

.section-about          { background: var(--color-bg); }
.section-projects       { background: var(--color-bg-soft); }
.section-practice       { background: var(--color-bg); }
.section-certifications { background: var(--color-bg); }

.section-eyebrow {
  font-size: 22px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.01em;
  color: #1a1a1a;
  display: inline-block;
  padding-bottom: 10px;
  border-bottom: 3px solid #185FA5;
  margin-bottom: 2rem;
  margin-top: 0;
}

.upcoming-eyebrow { margin-top: 3rem; }
.automation-eyebrow { margin-top: 3rem; }

/* =========================================================================
   ABOUT
   ========================================================================= */

.about-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.profile-photo-wrap {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem auto;
  position: relative;
}

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 1.5rem auto;
}

.profile-photo-fallback {
  display: flex;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(160deg, #3d1a6e 0%, #7b2d5e 60%, #c0392b 100%);
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 44px;
  position: absolute;
  top: 0; left: 0;
}

/* When the <img> loads, the fallback below it is hidden by JS via onerror;
   if the image loads, the fallback should not be visible behind it. */
.profile-photo + .profile-photo-fallback { display: none; }
.profile-photo[style*="display: none"] + .profile-photo-fallback { display: flex !important; }

.about-bio {
  max-width: 700px;
  margin: 0 auto 2rem auto;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
  text-align: center;
}

.expertise-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1080px;
  margin: 3rem auto 0;
}

@media (min-width: 760px) {
  .expertise-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

.expertise-col { text-align: center; }

.expertise-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--color-text);
}

.expertise-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.expertise-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #880e4f;
  font-size: 3rem;
  background: transparent;
  width: auto;
  height: auto;
  border-radius: 0;
}

.expertise-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-top: 1rem;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.expertise-col .tool-tags {
  margin: 0.6rem auto;
  max-width: 320px;
  gap: 6px;
}

.expertise-col .tool-tag {
  font-size: 0.85rem;
  padding: 4px 12px;
  border: 1px solid #880e4f;
  border-radius: 20px;
  color: #880e4f;
  background: transparent;
  margin: 3px;
  display: inline-block;
  line-height: 1.5;
}

/* Tool tags (used in about and projects) */
.tool-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: 0 auto;
  max-width: 280px;
}

.project-card .tool-tags {
  justify-content: flex-start;
  max-width: none;
  margin: 0.5rem 0;
}

.tool-tag {
  font-size: 10px;
  padding: 2px 9px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  line-height: 1.6;
}

/* =========================================================================
   PROJECTS — alternating cards
   ========================================================================= */

.projects-inner {
  max-width: 1020px;
  margin: 0 auto;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--color-card);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 1.25rem;
  min-height: 200px;
  box-shadow: var(--shadow-card);
}

@media (min-width: 720px) {
  .project-card { flex-direction: row; }
  .project-card.image-right { flex-direction: row; }
  .project-card.image-right .project-image { order: 2; }
  .project-card.image-right .project-body  { order: 1; }
}

.project-card.project-upcoming { opacity: 0.92; }

.project-image {
  position: relative;
  flex: 0 0 50%;
  min-height: 180px;
  background: #f4eee5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-note {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 25, 35, 0.78);
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  pointer-events: none;
}

/* Featured project image colored fallbacks (visible only when img fails) */
.project-image-cedarcare { background: linear-gradient(135deg, #1a1f2e 0%, #2a3548 100%); }
.project-image-maven     { background: linear-gradient(135deg, #1f3a5f 0%, #2c5985 100%); }
.project-image-lax       { background: linear-gradient(135deg, #1f5530 0%, #2e7a48 100%); }
.project-image-nlp       { background: linear-gradient(135deg, #f1f5f9 0%, #e2ebf3 100%); }
.project-image-stock     { background: linear-gradient(135deg, #0d1421 0%, #1c2840 100%); }

.project-image-nlp .image-note { background: rgba(80, 50, 110, 0.85); }

/* Project body */
.project-body {
  flex: 1 1 50%;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-title {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 0.4rem;
  color: var(--color-text);
}

.project-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0 0 0.75rem;
}

.project-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.4rem;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: #fff;
  color: var(--color-text);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.btn-pill:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-pill .fa { font-size: 11px; }

.btn-pill-primary {
  border-color: rgba(80, 130, 200, 0.7);
  color: #1e6fc8;
}

.btn-pill-primary:hover {
  background: rgba(30, 111, 200, 0.06);
  border-color: #1e6fc8;
  color: #1e6fc8;
}

/* =========================================================================
   UPCOMING — placeholder image panels
   ========================================================================= */

.project-image .placeholder-content {
  text-align: center;
  color: rgba(0, 0, 0, 0.55);
  padding: 1rem;
}

.project-image .placeholder-content .fa {
  font-size: 30px;
  margin-bottom: 12px;
  display: block;
  opacity: 0.7;
}

.placeholder-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  font-size: 10px;
}

.placeholder-tags span {
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  color: rgba(40, 25, 40, 0.6);
}

.placeholder-coral  { background: linear-gradient(135deg, #fbe1dc 0%, #f4c4bc 100%); color: #c44a3b; }
.placeholder-blue   { background: linear-gradient(135deg, #dde9f7 0%, #c4d8ee 100%); color: #3a6ea5; }
.placeholder-green  { background: linear-gradient(135deg, #dcefdc 0%, #c2e0c2 100%); color: #2f7a3b; }
.placeholder-amber  { background: linear-gradient(135deg, #f7ead0 0%, #ecd9a8 100%); color: #b07d28; }
.placeholder-purple { background: linear-gradient(135deg, #e3dcf2 0%, #d1c5e8 100%); color: #5b4493; }

.placeholder-coral  .placeholder-content { color: #c44a3b; }
.placeholder-blue   .placeholder-content { color: #3a6ea5; }
.placeholder-green  .placeholder-content { color: #2f7a3b; }
.placeholder-amber  .placeholder-content { color: #b07d28; }
.placeholder-purple .placeholder-content { color: #5b4493; }

/* Status badges (Upcoming) */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 4px 12px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--color-text-muted);
  margin-top: 0.4rem;
  width: fit-content;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-in-progress .status-dot { background: var(--color-amber); }
.status-planned     .status-dot { background: var(--color-gray-dot); }

.status-earned         .status-dot { background: var(--color-green); }
.status-earned {
  color: var(--color-green);
  border-color: rgba(47, 138, 67, 0.35);
  background: rgba(47, 138, 67, 0.08);
}

/* =========================================================================
   CERTIFICATION CARDS
   ========================================================================= */
.cert-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 1 300px;
  max-width: calc(33.333% - 0.667rem);   /* ~1/3 width → room for 2 more */
  background: var(--color-card);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.1rem 1.25rem;
}

.cert-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  flex-shrink: 0;
}

.cert-info { display: flex; flex-direction: column; gap: 0.35rem; }

.cert-title {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
  line-height: 1.35;
  color: var(--color-text);
}

.cert-issuer {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0;
}

@media (max-width: 720px) {
  .cert-card { flex-basis: 100%; max-width: 100%; }
}

/* =========================================================================
   CERTIFICATIONS BAR + FOOTER
   ========================================================================= */

.cert-intro {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin: 0 0 1.5rem;
  max-width: 700px;
}

.cert-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  min-height: 1rem;
}

.footer {
  background: var(--color-bg);
  margin-top: 0;
  padding: 1.25rem 1.5rem 2rem;
  text-align: center;
  color: var(--color-text-soft);
  font-size: 11px;
  border-top: 1px solid var(--color-border-soft);
}

.footer p { margin: 0.25rem 0; }
.footer a { color: var(--color-text-muted); }
.footer a:hover { color: var(--color-accent); }

/* =========================================================================
   Responsive tweaks
   ========================================================================= */

@media (max-width: 720px) {
  .section { padding: 2.5rem 1rem; }
  .project-image { min-height: 160px; }
  .image-note { font-size: 9px; }
}
