/* ==========================================================================
   Ven. Kosgoda Wimalawansa Tissa Thero — Portfolio
   Bootstrap 5 based, multilingual (EN / SI / TA)
   ========================================================================== */

:root {
  --dark-orange: #b45309;
  --dark-orange-light: #d97706;
  --dark-orange-pale: #fef3c7;
  --dark-orange-bg: #fffbeb;
  --orange-soft: #fde68a;
  --surface: #fbf9f8;
  --on-surface: #1b1c1c;
  --on-surface-variant: #444748;
  --outline-variant: #d4c9c4;
  --container-max: 1140px;
}

/* ---- Base ---- */
html { scroll-behavior: smooth; }

body {
  background-color: var(--surface);
  color: var(--on-surface);
  font-family: 'Inter', 'Noto Sans', sans-serif;
  background-image:
    radial-gradient(ellipse at 10% 20%, rgba(180, 83, 9, 0.03) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 80%, rgba(180, 83, 9, 0.03) 0%, transparent 55%);
}

/* language-specific type stacks */
body.font-en { font-family: 'Inter', sans-serif; }
body.font-si { font-family: 'Noto Sans Sinhala', 'Inter', sans-serif; }
body.font-ta { font-family: 'Noto Sans Tamil', 'Inter', sans-serif; }

.font-en .font-display, .font-en .brand-name { font-family: 'Playfair Display', serif; }
.font-si .font-display, .font-si .brand-name { font-family: 'Noto Serif Sinhala', 'Noto Sans Sinhala', serif; }
.font-ta .font-display, .font-ta .brand-name { font-family: 'Noto Serif Tamil', 'Noto Sans Tamil', serif; }

.container-max { max-width: var(--container-max); }

/* ---- Utility colors ---- */
.text-brand { color: var(--dark-orange) !important; }
.bg-brand { background-color: var(--dark-orange) !important; }
.border-brand { border-color: var(--dark-orange) !important; }
.bg-brand-soft { background-color: var(--dark-orange-pale) !important; }
.bg-brand-pale { background-color: var(--dark-orange-bg) !important; }
.text-variant { color: var(--on-surface-variant) !important; }

a { text-decoration: none; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: .75rem;
}
.eyebrow .rule { width: 2rem; height: 1px; background: rgba(180,83,9,.35); }
.eyebrow span {
  font-size: 10px;
  letter-spacing: .2em;
  font-weight: 600;
  color: var(--dark-orange);
  text-transform: uppercase;
}

.section-lead { max-width: 640px; }

.card-shadow { box-shadow: 0 8px 24px rgba(180, 83, 9, .06); }

/* ---- Navbar ---- */
.navbar-glass {
  background: rgba(255, 251, 235, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 201, 196, .35);
}

.brand-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--dark-orange);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: .8rem;
  flex-shrink: 0;
}

.brand-name { font-size: .9rem; font-weight: 600; line-height: 1.2; color: var(--on-surface); }
.brand-role { font-size: 10px; color: var(--on-surface-variant); display: block; }

.nav-link-custom {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--on-surface-variant);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav-link-custom:hover { color: var(--dark-orange); }
.nav-link-custom.active { color: var(--dark-orange); border-bottom-color: var(--dark-orange); }

.lang-pill {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--on-surface-variant);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.lang-pill:hover { background: var(--orange-soft); color: var(--dark-orange); }
.lang-pill.active { background: var(--orange-soft); color: var(--dark-orange); }

.hamburger-btn { width: 36px; height: 36px; }
.hamburger-btn span {
  display: block; width: 22px; height: 2px; background: var(--on-surface);
  margin: 4px auto; transition: all .3s cubic-bezier(.4,0,.2,1);
}
.hamburger-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Offcanvas menu */
.offcanvas-brand { border-bottom: 1px solid rgba(212,201,196,.3); }
.offcanvas .nav-link-custom { font-size: 15px; padding: .65rem 0; border-bottom: 1px solid rgba(212,201,196,.2); }

/* ---- Hero ---- */
.hero-section {
  padding-top: 7.5rem;
  background-color: var(--dark-orange-bg);
  background-image: radial-gradient(circle at 20% 30%, rgba(180, 83, 9, .05) 1px, transparent 1px);
  background-size: 30px 30px;
  overflow: hidden;
}
.hero-name {
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.15;
}
.hero-role { color: var(--dark-orange); font-style: italic; font-weight: 600; }

.hero-image-wrapper {
  aspect-ratio: 4 / 5;
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
  border-radius: 2rem 2rem 0 0;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(180,83,9,.18);
  border: 4px solid rgba(255,255,255,.7);
  position: relative;
  background: linear-gradient(160deg, var(--orange-soft), var(--dark-orange-pale));
}
.hero-image-wrapper img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.hero-image-glow {
  position: absolute; inset: 0;
  background: rgba(180,83,9,.08);
  border-radius: 50%;
  transform: scale(1.15);
  filter: blur(35px);
  z-index: -1;
}
.hero-photo-fallback {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 4.5rem; font-weight: 700; color: var(--dark-orange);
}

.btn-brand {
  background: var(--dark-orange);
  color: #fff;
  border-radius: 999px;
  padding: .7rem 1.9rem;
  font-size: .9rem;
  font-weight: 500;
  border: 1px solid var(--dark-orange);
  transition: background .2s ease, opacity .2s ease;
}
.btn-brand:hover { background: var(--dark-orange-light); color: #fff; opacity: .92; }

.btn-outline-brand {
  border: 1px solid var(--dark-orange);
  color: var(--dark-orange);
  border-radius: 999px;
  padding: .7rem 1.9rem;
  font-size: .9rem;
  font-weight: 500;
  background: transparent;
  transition: background .2s ease;
}
.btn-outline-brand:hover { background: rgba(180,83,9,.06); color: var(--dark-orange); }

/* ---- Philosophy / About ---- */
.philosophy-card {
  background: var(--dark-orange-pale);
  color: var(--dark-orange);
  border: 1px solid rgba(180,83,9,.12);
  border-radius: .75rem;
  padding: 2.25rem 2rem;
  position: relative;
  overflow: hidden;
  height: 100%;
}
.philosophy-quote-icon {
  position: absolute; top: 1.5rem; left: 1.5rem;
  font-size: 3.5rem; opacity: .12;
}
.philosophy-quote {
  position: relative; z-index: 1;
  font-style: italic;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.6;
  margin-top: 2rem;
  margin-bottom: 1.75rem;
}
.philosophy-label { font-size: .72rem; letter-spacing: .18em; opacity: .75; font-weight: 600; }

.stat-box {
  background: var(--dark-orange-bg);
  border: 1px solid rgba(180,83,9,.1);
  border-radius: .6rem;
  text-align: center;
  padding: 1rem .6rem;
}
.stat-icon { color: var(--dark-orange); font-size: 1.9rem; }
.stat-number { font-size: 1.7rem; font-weight: 700; color: var(--dark-orange); margin-top: .15rem; }
.stat-label { font-size: 9px; letter-spacing: .08em; color: var(--on-surface-variant); font-weight: 600; text-transform: uppercase; }

/* ---- Timeline ---- */
.timeline { position: relative; padding-left: 1.75rem; }
.timeline-item { position: relative; padding-bottom: 2.25rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -1.75rem; top: 30px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--dark-orange); background: var(--surface);
}
.timeline-line {
  position: absolute; left: -1.5rem; top: 42px; bottom: -12px;
  border-left: 1px dashed rgba(180,83,9,.3);
}
.timeline-item:last-child .timeline-line { display: none; }
.timeline-date { font-size: 11px; letter-spacing: .05em; font-weight: 600; color: rgba(180,83,9,.75); margin-bottom: .35rem; }
.timeline-card {
  background: #fff; border: 1px solid rgba(212,201,196,.35);
  border-radius: .6rem; padding: 1.5rem;
}
.timeline-card.current { border-color: rgba(180,83,9,.25); box-shadow: 0 6px 22px rgba(180,83,9,.08); }
.timeline-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .3rem; }
.timeline-card p { font-size: .9rem; color: var(--on-surface-variant); margin-bottom: 0; }
.timeline-badge {
  display: inline-block; margin-top: .6rem;
  background: rgba(180,83,9,.1); color: var(--dark-orange);
  font-size: 10px; font-weight: 600; letter-spacing: .05em;
  padding: .3rem .7rem; border-radius: .3rem;
}

/* ---- Education / Skills cards ---- */
.edu-card {
  background: var(--dark-orange-bg);
  border: 1px solid rgba(180,83,9,.1);
  border-radius: .6rem; padding: 1.5rem;
  height: 100%;
  transition: border-color .2s ease;
}
.edu-card:hover { border-color: rgba(180,83,9,.35); }
.edu-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .25rem; }
.edu-card .inst { font-size: .875rem; color: var(--on-surface-variant); margin-bottom: .85rem; }
.edu-card .tags { display: flex; justify-content: space-between; font-size: .75rem; font-weight: 600; color: rgba(180,83,9,.75); }

.skill-card {
  background: #fff; border: 1px solid rgba(212,201,196,.35);
  border-radius: .6rem; padding: 1.6rem; height: 100%;
}
.skill-badge {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--dark-orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; margin-bottom: 1rem;
}
.skill-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .3rem; }
.skill-card p { font-size: .8rem; color: var(--on-surface-variant); margin-bottom: 0; }

/* ---- Recognition ---- */
.recognition-card {
  background: var(--dark-orange-pale);
  color: var(--dark-orange);
  border: 1px solid rgba(180,83,9,.12);
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}
.recognition-medal {
  width: 150px; height: 150px;
  border-radius: 50%;
  border: 4px solid rgba(180,83,9,.2);
  background: rgba(255,255,255,.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  flex-shrink: 0;
}
.recognition-medal .marks { font-size: 2.6rem; font-weight: 700; color: var(--dark-orange); }
.recognition-medal .marks-label { font-size: 7px; letter-spacing: .18em; color: rgba(180,83,9,.7); font-weight: 600; }
.recognition-title { font-size: 1.4rem; font-weight: 700; color: var(--dark-orange); }

/* ---- Contact ---- */
.contact-card {
  background: #fff; border: 1px solid rgba(212,201,196,.35);
  border-radius: .6rem; padding: 1.6rem;
  display: flex; align-items: flex-start; gap: 1.1rem;
  height: 100%;
}
.contact-icon {
  background: rgba(180,83,9,.06); color: var(--dark-orange);
  border-radius: 50%; width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-label { font-size: 10px; color: var(--on-surface-variant); font-weight: 600; letter-spacing: .05em; margin-bottom: .25rem; text-transform: uppercase; }
.contact-value { font-size: .9rem; font-weight: 500; color: var(--on-surface); margin-bottom: .3rem; }
.contact-cta { font-size: .78rem; color: var(--dark-orange); text-decoration: underline; text-decoration-color: rgba(180,83,9,.3); text-underline-offset: 4px; }
.contact-cta:hover { text-decoration-color: var(--dark-orange); color: var(--dark-orange); }

/* ---- Footer ---- */
.site-footer { background: var(--dark-orange-bg); border-top: 1px solid rgba(212,201,196,.3); }
.footer-name { font-weight: 700; font-size: 1rem; color: var(--dark-orange); }
.footer-role { font-size: .78rem; color: var(--on-surface-variant); }
.footer-copy { font-size: 10px; color: rgba(68,71,72,.6); }

.back-to-top {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--dark-orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(180,83,9,.35);
  z-index: 60;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--dark-orange-light); }

/* ---- Section heading sizes ---- */
.section-title {
  font-weight: 700;
}
@media (max-width: 575.98px) {
  .hero-name { font-size: 2rem; }
  .recognition-card { text-align: center; }
}

/* Material symbol sizing helper */
.msi { font-variation-settings: 'FILL' 1; }
