/* =====================================================
   RAVINDI AYODHYA — PORTFOLIO STYLES
   ===================================================== */

/* ===== VARIABLES ===== */
:root {
  --tr: 0.3s cubic-bezier(.4,0,.2,1);
  --accent: #7C9EFF;
  --accent2: #4a6ff5;
  --radius: 14px;
}

[data-theme="dark"] {
  --bg: #0a0a0d;
  --bg2: #111116;
  --bg3: #1a1a22;
  --border: rgba(255,255,255,0.07);
  --text: #EDECF4;
  --text2: #8A8799;
  --text3: #4a4858;
  --card: rgba(255,255,255,0.03);
  --card-h: rgba(255,255,255,0.07);
  --nav-bg: rgba(10,10,13,0.92);
  --shadow: 0 8px 40px rgba(0,0,0,0.6);
  --skill-bg: rgba(124,158,255,0.08);
  --skill-border: rgba(124,158,255,0.2);
  --home-bg: #000000;
  --about-bg: #000000;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg2: #f4f4f8;
  --bg3: #e8e8ef;
  --border: rgba(0,0,0,0.09);
  --text: #111114;
  --text2: #555566;
  --text3: #9999aa;
  --card: rgba(0,0,0,0.025);
  --card-h: rgba(0,0,0,0.055);
  --nav-bg: rgba(255,255,255,0.93);
  --shadow: 0 8px 40px rgba(0,0,0,0.1);
  --accent: #3956d6;
  --accent2: #2c44b0;
  --skill-bg: rgba(74,111,245,0.07);
  --skill-border: rgba(74,111,245,0.2);
  --home-bg: #ffffff;
  --about-bg: #ffffff;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  width: 100%;
  overflow-x: hidden;
}
body {
  font-family: 'Times New Roman', Times, serif;
  background: var(--bg);
  color: var(--text);
  transition: background var(--tr), color var(--tr);
  overflow-x: hidden;
  width: 100%;
  position: relative;
  font-size: 17px;
  line-height: 1.75;
}

#bgCanvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
section { position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
p { text-align: justify; font-size: 17px; line-height: 1.9; }

/* ===== CANVAS BACKGROUND ===== */
/* ===== ADMIN BANNER ===== */
#admin-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 4000;
  background: var(--accent); color: #fff;
  text-align: center; padding: 7px 16px;
  font-size: 13px; font-weight: 500; display: none;
  font-family: 'DM Sans', sans-serif;
}
#admin-banner.active { display: block; }
body.admin-mode nav { top: 33px; }

/* Admin button — always visible */
.admin-btn {
  background: none; border: 1px solid var(--border);
  color: var(--text2); padding: 5px 14px; border-radius: 20px;
  font-size: 12px; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-weight: 500;
  letter-spacing: 0.04em; transition: all var(--tr);
  display: inline-block;
}
.admin-btn:hover { border-color: var(--accent); color: var(--accent); }
.admin-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Editable fields */
[data-editable] { cursor: default; transition: outline var(--tr); }
body.admin-mode [data-editable] {
  cursor: text;
  outline: 1px dashed rgba(124,158,255,0.4);
  border-radius: 3px; min-width: 30px; min-height: 1em;
}
body.admin-mode [data-editable]:hover { outline: 1px solid var(--accent); background: rgba(124,158,255,0.05); }
body.admin-mode [data-editable]:focus { outline: 2px solid var(--accent); }
body.admin-mode .img-zone { cursor: pointer; position: relative; }
body.admin-mode .img-zone::after {
  content: '📷 Click to change';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(124,158,255,0.14); color: var(--accent);
  font-size: 13px; font-weight: 600; opacity: 0;
  transition: opacity var(--tr); border-radius: inherit;
  font-family: 'DM Sans', sans-serif;
}
body.admin-mode .img-zone:hover::after { opacity: 1; }
.cv-hint { display: none; font-size: 12px; color: var(--accent); margin-top: 0.8rem; font-family: 'DM Sans', sans-serif; }
body.admin-mode .cv-hint { display: block; }

/* ===== NAVIGATION ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 6%; height: 64px;
  background: var(--nav-bg); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all var(--tr);
}
.nav-links { display: flex; gap: 2rem; list-style: none; }

/* Footer also uses a <nav> tag for its links — reset it back to normal
   static footer layout so it doesn't inherit the header's position:fixed */
.footer-nav {
  position: static; top: auto; left: auto; right: auto; z-index: auto;
  height: auto; padding: 0; background: none; backdrop-filter: none;
  border-bottom: none;
}
.nav-links a {
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--text2);
  transition: color var(--tr); position: relative;
  font-family: 'DM Sans', sans-serif;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -3px; left: 0; right: 0;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transition: transform var(--tr); border-radius: 1px;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { transform: scaleX(1); }

.nav-right { display: flex; align-items: center; gap: 0.8rem; margin-left: 2rem; }
.theme-toggle {
  width: 42px; height: 22px; background: var(--bg3);
  border: 1px solid var(--border); border-radius: 11px;
  cursor: pointer; position: relative; flex-shrink: 0;
  transition: background var(--tr);
}
.theme-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); transition: transform var(--tr);
}
[data-theme="light"] .theme-toggle::after { transform: translateX(20px); }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--tr); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.mobile-nav {
  display: none; position: fixed; top: 64px; left: 0; right: 0;
  background: var(--nav-bg); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 6%; flex-direction: column; gap: 1.2rem; z-index: 999;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { font-size: 15px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text2); font-family: 'DM Sans', sans-serif; }
body.admin-mode .mobile-nav { top: 97px; }

/* ===== CONTAINER ===== */
.c { max-width: 1160px; margin: 0 auto; padding: 0 6%; position: relative; z-index: 1; }

/* ===== SECTION HEADINGS ===== */
.sec-heading {
  font-size: 28px; font-weight: 400; color: var(--text);
  text-align: center; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.sec-heading-line {
  width: 48px; height: 3px; background: var(--accent);
  margin: 0 auto 2.5rem; border-radius: 2px;
}
.sec-heading-left {
  font-size: 26px; font-weight: 400; color: var(--text);
  letter-spacing: 0.08em; margin-bottom: 0.5rem; text-transform: uppercase;
}
.sec-heading-line-left {
  width: 44px; height: 3px; background: var(--accent);
  margin: 0 0 2rem; border-radius: 2px;
}

/* ===== REVEAL ANIMATION ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; font-family: 'Times New Roman', Times, serif;
  font-size: 16px; font-weight: 400; letter-spacing: 0.03em;
  border: 1px solid var(--border); cursor: pointer; transition: all var(--tr);
  background: var(--bg3); color: var(--text); border-radius: var(--radius);
}
.btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-blue { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-blue:hover { background: #5a82ff; border-color: #5a82ff; color: #fff; }

/* ===========================
   HOME
=========================== */
#home {
  min-height: 100vh; display: flex; align-items: center;
  padding: 90px 0 60px; background: var(--home-bg);
  transition: background var(--tr); position: relative; overflow: hidden;
}
.home-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center; width: 100%;
}
.home-content { display: flex; flex-direction: column; justify-content: center; }

/* Staggered entrance animations */
.home-name {
  font-size: clamp(36px,5vw,58px);
  font-weight: 400;
  letter-spacing: -0.01em; line-height: 1.1;
  color: var(--text); margin-bottom: 0.5rem;
  animation: fadeSlideUp 0.8s ease both;
}
.home-role {
  font-size: 18px; color: var(--accent); margin-bottom: 2rem;
  font-weight: 500; animation: fadeSlideUp 0.8s 0.15s ease both;
}
.home-tagline {
  font-size: clamp(15px,1.4vw,18px); line-height: 1.85;
  color: var(--text2); margin-bottom: 2rem; max-width: 480px;
  text-align: left !important; animation: fadeSlideUp 0.8s 0.3s ease both;
}
.home-btns { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; animation: fadeSlideUp 0.8s 0.45s ease both; }

/* Social icons */
.home-socials { display: flex; gap: 0.75rem; flex-wrap: wrap; animation: fadeSlideUp 0.8s 0.6s ease both; }
.soc-icon {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); font-size: 16px; transition: all var(--tr);
}
.soc-icon:hover {
  background: var(--accent); border-color: var(--accent); color: #fff;
  transform: translateY(-3px); box-shadow: 0 6px 20px rgba(124,158,255,0.35);
}

/* Home image — circular photo with rotating dashed ring frame */
.home-img-col { display: flex; align-items: center; justify-content: flex-end; animation: fadeIn 1s 0.2s ease both; }
.home-img-frame {
  position: relative; width: 100%; max-width: 360px; max-height: 360px;
}
.home-img-frame::after {
  content: ""; position: absolute; inset: -40px; z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.25; filter: blur(20px);
  animation: glowPulse 4s ease-in-out infinite;
}
.home-img-frame::before {
  content: ""; position: absolute; inset: -12px;
  border-radius: 50%; border: 2.5px solid var(--accent);
  opacity: 0.6; pointer-events: none;
}
.home-img-card {
  position: relative; width: 100%;
  aspect-ratio: 1/1; overflow: hidden;
  background: var(--bg3); border-radius: 50%;
}
.home-img-card img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 62%;
}
.home-img-ph {
  position: absolute; inset: 0; background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 0.5rem; color: var(--text3);
  font-size: 14px; font-family: 'DM Sans', sans-serif; border-radius: 50%;
}

@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spinFrame { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes glowPulse { 0%, 100% { opacity: 0.18; transform: scale(1); } 50% { opacity: 0.32; transform: scale(1.06); } }

/* ===========================
   ABOUT
=========================== */
#about {
  min-height: 100vh; padding: 90px 0 60px;
  background: var(--about-bg); transition: background var(--tr); position: relative;
}
/* 55/45 split — text wider, image narrower & full height */
.about-wrap { position: relative; }
.about-grid {
  display: grid; grid-template-columns: 55% 45%;
  gap: 3rem; align-items: start; min-width: 0;
}
.about-text { min-width: 0; }
.about-text p { font-size: 17px; line-height: 1.95; color: var(--text2); margin-bottom: 1.3rem; text-align: justify; overflow-wrap: break-word; word-break: break-word; }
.about-img-col {
  position: absolute; top: 6px; right: 0; width: 45%;
  display: flex; flex-direction: column; align-items: flex-end;
}
.about-img-box {
  width: 100%; max-width: 340px;
  /* height is set dynamically via JS: top of "About Me" heading to bottom of tab buttons */
  aspect-ratio: auto; min-height: 200px;
  overflow: hidden; position: relative;
  background: transparent; border-radius: 0;
}
.about-img-box img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top; display: block;
  transform: scale(1.18);
  transform-origin: center bottom;
}
.about-img-ph {
  position: absolute; inset: 0; background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 0.5rem;
  color: var(--text3); font-size: 14px; font-family: 'DM Sans', sans-serif;
}

/* Tab buttons — blue rounded */
.about-tabs { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-top: 2rem; }
.tab-btn {
  padding: 9px 16px; font-family: 'Times New Roman', Times, serif;
  font-size: 15px; font-weight: 400; white-space: nowrap; flex-shrink: 0;
  background: rgba(74,111,245,0.14); border: 1px solid rgba(124,158,255,0.35);
  color: var(--accent); cursor: pointer; transition: all var(--tr);
  letter-spacing: 0.02em; border-radius: var(--radius);
}
.tab-btn:hover, .tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===========================
   TAB PANELS — full width like screenshots
=========================== */
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-section { background: var(--bg2); padding: 55px 0; position: relative; z-index: 1; }

/* Full container width — no grid restriction */
.tab-section .c { display: block; }
.tab-content-inner { width: 100%; }

.bio-text p { font-size: 17px; line-height: 1.9; color: var(--text2); margin-bottom: 1.2rem; text-align: justify; }

/* ===========================
   SKILLS
=========================== */
.skills-section-h {
  font-size: 13px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem;
  font-family: 'DM Sans', sans-serif;
}
.skills-section-h::before {
  content: ''; width: 3px; height: 18px;
  background: var(--accent); border-radius: 2px; display: inline-block;
}
.skills-block { margin-bottom: 0.5rem; }

/* Horizontal skill chips with icons */
.skill-chips { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-bottom: 0.75rem; }
.skill-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 8px 16px; background: var(--skill-bg);
  border: 1px solid var(--skill-border); border-radius: var(--radius);
  font-size: 14px; font-family: 'DM Sans', sans-serif;
  color: var(--text2); transition: all var(--tr); cursor: default;
}
.skill-chip:hover { background: rgba(124,158,255,0.16); border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.skill-chip i { font-size: 16px; width: 18px; text-align: center; }
.skill-logo { width: 17px; height: 17px; object-fit: contain; flex-shrink: 0; }

/* Admin: add/delete */
.add-skill-btn {
  display: none; padding: 6px 14px; background: none;
  border: 1px dashed var(--accent); color: var(--accent);
  border-radius: var(--radius); font-size: 12px; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: all var(--tr);
}
body.admin-mode .add-skill-btn { display: inline-flex; align-items: center; gap: 4px; }
.add-skill-btn:hover { background: rgba(124,158,255,0.1); }
.del-chip { display: none; margin-left: 4px; color: rgba(255,100,100,0.75); cursor: pointer; font-size: 11px; }
body.admin-mode .del-chip { display: inline; }

/* Soft skills — horizontal rounded chips */
.soft-chips { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-bottom: 0.75rem; }
.soft-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 9px 20px; background: rgba(124,158,255,0.08);
  border: 1px solid rgba(124,158,255,0.2); border-radius: var(--radius);
  font-size: 15px; font-family: 'Times New Roman', Times, serif;
  color: var(--text2); transition: all var(--tr);
}
.soft-chip:hover { background: rgba(124,158,255,0.16); color: var(--text); }

/* ===========================
   EDUCATION
=========================== */
.edu-item {
  background: var(--card); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem 1.8rem;
  margin-bottom: 1rem; cursor: pointer;
  transition: border-color 0.35s cubic-bezier(.4,0,.2,1),
              box-shadow 0.35s cubic-bezier(.4,0,.2,1),
              transform 0.35s cubic-bezier(.4,0,.2,1),
              background 0.35s cubic-bezier(.4,0,.2,1);
}
.edu-item:hover {
  border-color: rgba(124,158,255,0.45);
  transform: translateY(-2px);
}
.edu-item.box-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,158,255,0.18), 0 8px 32px rgba(124,158,255,0.15);
  background: rgba(124,158,255,0.06);
  transform: translateY(-3px);
  animation: boxPop 0.38s cubic-bezier(.4,0,.2,1);
}
@keyframes boxPop {
  0%   { transform: translateY(0) scale(1); }
  40%  { transform: translateY(-5px) scale(1.015); }
  100% { transform: translateY(-3px) scale(1); }
}
.edu-degree { font-size: 17px; font-weight: 500; margin-bottom: 0.2rem; }
.edu-school { font-size: 15px; color: var(--accent); margin-bottom: 0.12rem; }
.edu-years { font-size: 13px; color: var(--text3); }
.edu-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.edu-pill {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  font-family: 'DM Sans', sans-serif; font-size: 12.5px; font-weight: 500;
  color: var(--accent); background: rgba(124,158,255,0.12);
  border: 1px solid rgba(124,158,255,0.3);
}

/* Experience card click animation — same as edu-item */
.exp-card {
  cursor: pointer;
  transition: border-color 0.35s cubic-bezier(.4,0,.2,1),
              box-shadow 0.35s cubic-bezier(.4,0,.2,1),
              transform 0.35s cubic-bezier(.4,0,.2,1),
              background 0.35s cubic-bezier(.4,0,.2,1);
}
.exp-card:hover { border-color: rgba(124,158,255,0.45) !important; transform: translateY(-2px); }
.exp-card.box-selected {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(124,158,255,0.18), 0 8px 32px rgba(124,158,255,0.15);
  background: rgba(124,158,255,0.06);
  transform: translateY(-3px);
  animation: boxPop 0.38s cubic-bezier(.4,0,.2,1);
}

/* Certificates carousel */
.cert-section { margin-top: 2.2rem; }
.cert-row-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.cert-row-label { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text3); font-family: 'DM Sans', sans-serif; }
.cert-nav { display: flex; gap: 0.35rem; }
.cert-nav-btn { width: 28px; height: 28px; border: 1px solid var(--border); background: transparent; cursor: pointer; color: var(--text2); font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: all var(--tr); border-radius: 6px; }
.cert-nav-btn:hover { border-color: var(--text); color: var(--text); }
.cert-carousel { position: relative; background: var(--card); border: 1px solid var(--border); overflow: hidden; height: 300px; border-radius: var(--radius); width: 100%; }
.cert-slide { position: absolute; inset: 0; display: flex; align-items: center; padding: 1rem 1.6rem; opacity: 0; pointer-events: none; transition: opacity 0.6s ease; }
.cert-slide.active { opacity: 1; pointer-events: auto; }
.cert-img { width: 280px; height: 195px; object-fit: cover; border: 1px solid var(--border); background: var(--bg3); flex-shrink: 0; border-radius: 8px; cursor: zoom-in; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.cert-img:hover { transform: scale(1.03); box-shadow: 0 8px 28px rgba(0,0,0,0.18); }
.cert-img-ph { width: 280px; height: 195px; background: var(--bg3); border: 1px dashed var(--border); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 0.3rem; color: var(--text3); font-size: 12px; text-align: center; flex-shrink: 0; cursor: pointer; font-family: 'DM Sans', sans-serif; border-radius: 8px; }
.cert-info { padding-left: 1.4rem; }
.cert-name { font-size: 16px; font-weight: 500; margin-bottom: 0.25rem; }
.cert-org { font-size: 14px; color: var(--accent); margin-bottom: 0.12rem; }
.cert-year { font-size: 13px; color: var(--text3); font-style: italic; }
.cert-progress { position: absolute; bottom: 0; left: 0; height: 2px; background: var(--accent); animation: cProg 10s linear infinite; }
@keyframes cProg { from { width: 0; } to { width: 100%; } }
.cert-dots { display: flex; gap: 5px; justify-content: center; margin-top: 0.7rem; }
.cert-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--border); cursor: pointer; transition: background var(--tr); }
.cert-dot.active { background: var(--accent); }
.add-cert-btn { display: none; background: none; border: 1px dashed var(--border); color: var(--text3); padding: 4px 10px; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 12px; transition: all var(--tr); border-radius: 6px; }
body.admin-mode .add-cert-btn { display: inline-flex; align-items: center; gap: 4px; }
.add-cert-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===========================
   EXPERIENCE
=========================== */
.exp-timeline { position: relative; }
.exp-timeline::before { content: ''; position: absolute; left: 14px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.exp-item { display: flex; gap: 1.4rem; margin-bottom: 1.4rem; position: relative; }
.exp-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--bg3); border: 2px solid var(--accent); flex-shrink: 0; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.exp-dot::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.exp-card { flex: 1; background: var(--card); border: 2px solid var(--border); padding: 1.3rem 1.8rem; border-radius: var(--radius); width: 100%; cursor: pointer; transition: border-color 0.35s cubic-bezier(.4,0,.2,1), box-shadow 0.35s cubic-bezier(.4,0,.2,1), transform 0.35s cubic-bezier(.4,0,.2,1), background 0.35s cubic-bezier(.4,0,.2,1); }
.exp-role { font-size: 17px; font-weight: 500; margin-bottom: 0.18rem; }
.exp-company { font-size: 15px; color: var(--accent); margin-bottom: 0.12rem; }
.exp-meta { font-size: 13px; color: var(--text3); }
.exp-desc { font-size: 14.5px; color: var(--text2); line-height: 1.7; margin: 0.55rem 0 0; text-align: left; }
.add-exp-btn { display: none; background: none; border: 1px dashed var(--border); color: var(--text3); padding: 6px 12px; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 13px; margin-left: 44px; margin-top: 0.4rem; transition: all var(--tr); border-radius: 6px; }
body.admin-mode .add-exp-btn { display: block; }
.add-exp-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===========================
   PORTFOLIO
=========================== */
#portfolio { min-height: 100vh; padding: 90px 0 60px; background: var(--bg); position: relative; }
.port-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 1.4rem; }
.port-card { background: var(--card); border: 1px solid var(--border); transition: all var(--tr); border-radius: var(--radius); overflow: hidden; }
.port-card:hover { background: var(--card-h); transform: translateY(-4px); box-shadow: var(--shadow); }
.port-card-hd { padding: 1.3rem 1.4rem 0.9rem; border-bottom: 1px solid var(--border); }
.port-tag { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.35rem; font-family: 'DM Sans', sans-serif; }
.port-title { font-size: 18px; font-weight: 500; margin-bottom: 0.45rem; }
.port-desc { font-size: 15px; color: var(--text2); line-height: 1.75; text-align: justify; }
.port-body { padding: 0.9rem 1.4rem 1.4rem; }
.port-stack { font-size: 14px; color: var(--text2); line-height: 1.6; }
.port-stack strong { color: var(--text); font-weight: 500; }
.port-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.1rem; }
.port-pill {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  font-family: 'DM Sans', sans-serif; font-size: 12.5px; font-weight: 500;
  color: var(--accent); background: rgba(124,158,255,0.12);
  border: 1px solid rgba(124,158,255,0.3);
}
.add-proj-btn { display: none; width: 100%; padding: 11px; background: none; border: 1px dashed var(--border); color: var(--text3); cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 13px; margin-top: 1rem; transition: all var(--tr); border-radius: var(--radius); }
body.admin-mode .add-proj-btn { display: block; }
.add-proj-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===========================
   BLOG
=========================== */
#blog { padding: 90px 0 60px; background: var(--bg); position: relative; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 1.4rem; }
.blog-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: all var(--tr); }
.blog-card:hover { background: var(--card-h); transform: translateY(-3px); box-shadow: var(--shadow); }
.blog-date { font-size: 12px; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; font-family: 'DM Sans', sans-serif; }
.blog-title { font-size: 18px; font-weight: 500; margin-bottom: 0.5rem; line-height: 1.4; }
.blog-excerpt { font-size: 15px; color: var(--text2); line-height: 1.4; text-align: justify; margin-bottom: 1rem; }
.blog-read { font-size: 13px; color: var(--accent); font-family: 'DM Sans', sans-serif; letter-spacing: 0.05em; }
.blog-read:hover { text-decoration: underline; }
.add-blog-btn { display: none; width: 100%; padding: 11px; background: none; border: 1px dashed var(--border); color: var(--text3); cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 13px; margin-top: 1rem; transition: all var(--tr); border-radius: var(--radius); }
body.admin-mode .add-blog-btn { display: block; }
.add-blog-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===========================
   RESEARCH
=========================== */
#research { padding: 90px 0 60px; background: var(--bg2); position: relative; }
.research-card { position: relative; padding-top: 2.6rem; }
.research-status {
  position: absolute; top: 1.1rem; right: 1.2rem;
  display: flex; align-items: center; gap: 6px;
  font-family: 'DM Sans', sans-serif; font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: #34d399;
}
.research-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.research-dot-green {
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52,211,153,0.6);
  animation: researchDotPulse 1.8s ease-out infinite;
}
@keyframes researchDotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(52,211,153,0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

/* ===========================
   CONTACT
=========================== */
#contact { min-height: 100vh; padding: 90px 0 60px; background: var(--bg); position: relative; }
.contact-sub { font-size: 17px; color: var(--text2); max-width: 100%; margin: 0 auto 2rem; text-align: center; white-space: nowrap; }
.contact-form-wrap { max-width: 100%; margin: 0 auto 2.5rem; }

/* ===== INFO PILL (LOCATION / TIMEZONE / LIVE CLOCK) — matches research/blog card box ===== */
.info-pill {
  width: 100%; margin: 0 auto 2rem; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; display: flex; align-items: center;
  justify-content: space-between; gap: 2rem; transition: all var(--tr);
}
.info-pill:hover { background: var(--card-h); transform: translateY(-3px); box-shadow: var(--shadow); }
.info-pill-left { display: flex; flex-direction: column; gap: 0.35rem; text-align: left; align-items: flex-start; }
.info-pill-badge {
  display: inline-block; align-self: flex-start; background: rgba(124,158,255,0.12); color: var(--accent);
  font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 4px 12px; border-radius: 999px; margin-bottom: 4px;
}
.info-pill-row { font-family: 'DM Sans', sans-serif; font-size: 13.5px; color: var(--text2); margin: 0; }
.info-pill-label { color: var(--text3); font-weight: 600; }
.info-pill-right { flex-shrink: 0; text-align: right; }
.info-clock-card { display: flex; align-items: center; gap: 1.2rem; }
.info-clock-info { text-align: right; }
.info-clock-city {
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 700; color: var(--text); margin: 0 0 4px;
}
.info-clock-time { display: flex; align-items: baseline; gap: 0; justify-content: flex-end; }
.info-clock-hm { font-family: 'DM Sans', sans-serif; font-size: 28px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.info-clock-ampm { font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700; color: var(--accent); }
.info-clock-date { font-family: 'DM Sans', sans-serif; font-size: 12px; color: var(--text3); margin: 3px 0 0; }
.info-clock-svg { width: 90px; height: 90px; flex-shrink: 0; }
.info-clock-face { fill: var(--bg3); stroke: var(--border); stroke-width: 1.5; }
.info-clock-tick { stroke: var(--text3); stroke-width: 2; stroke-linecap: round; }
.info-clock-hand { stroke-linecap: round; }
.info-clock-hour { stroke: var(--text); stroke-width: 4; }
.info-clock-min { stroke: var(--text); stroke-width: 3; }
.info-clock-sec { stroke: var(--accent); stroke-width: 1.6; }
.info-clock-center { fill: var(--accent); }
@media (max-width: 640px) {
  .info-pill { flex-direction: column; text-align: center; }
  .info-pill-left { align-items: center; }
  .info-clock-info { text-align: center; }
  .info-clock-time { justify-content: center; }
  .info-clock-card { flex-direction: column; }
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 0.9rem; }
.form-label { font-size: 14px; color: var(--text2); letter-spacing: 0.04em; }
.form-input, .form-textarea {
  background: var(--bg3); border: 1px solid var(--border);
  padding: 10px 14px; color: var(--text);
  font-family: 'Times New Roman', Times, serif;
  font-size: 16px; outline: none;
  transition: border-color var(--tr); border-radius: var(--radius);
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 108px; }
.contact-divider {
  text-align: center; font-size: 13px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text3);
  max-width: 660px; margin: 0 auto 1.4rem; position: relative;
  font-family: 'DM Sans', sans-serif;
}
.contact-divider::before, .contact-divider::after { content: ''; position: absolute; top: 50%; width: 38%; height: 1px; background: var(--border); }
.contact-divider::before { left: 0; }
.contact-divider::after { right: 0; }
.contact-icons { display: flex; justify-content: center; gap: 1.2rem; max-width: 660px; margin: 0 auto; }
.ci {
  width: 50px; height: 50px;
  background: var(--accent); border: 1px solid var(--accent);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: all var(--tr);
}
.ci:hover { background: #5a82ff; border-color: #5a82ff; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(124,158,255,0.35); }

.ci svg { width: 21px; height: 21px; fill: #fff; }

/* ===========================
   FOOTER
=========================== */
footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 3rem 6% 2rem; position: relative; z-index: 1;
}
.footer-inner { max-width: 1160px; margin: 0 auto; text-align: center; }
.footer-nav {
  display: flex; gap: 2.5rem; flex-wrap: wrap;
  justify-content: center; margin-bottom: 1.2rem;
}
.footer-nav a {
  font-size: 13px; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--text2); font-family: 'DM Sans', sans-serif;
  transition: color var(--tr); font-weight: 500;
}
.footer-nav a:hover { color: var(--accent); }
.footer-copy { font-size: 14px; color: var(--text3); text-align: center; }

/* Quick nav above copyright */
.footer-quick-nav {
  display: flex; gap: 1.4rem; flex-wrap: wrap;
  justify-content: center; margin-bottom: 0.75rem;
}
.footer-quick-nav a {
  font-size: 13px; color: var(--text3);
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.06em; transition: color var(--tr);
  position: relative;
}
.footer-quick-nav a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transition: transform var(--tr); border-radius: 1px;
}
.footer-quick-nav a:hover { color: var(--accent); }
.footer-quick-nav a:hover::after { transform: scaleX(1); }

/* ===========================
   MODALS
=========================== */
.modal { display: none; position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,0.65); backdrop-filter: blur(6px); align-items: center; justify-content: center; }
.modal.open { display: flex; }
.modal-box { background: var(--bg2); border: 1px solid var(--border); padding: 1.8rem; width: min(440px,90vw); box-shadow: var(--shadow); border-radius: 16px; }
.modal-title { font-size: 17px; font-weight: 500; margin-bottom: 1.1rem; }
.modal-input { width: 100%; padding: 9px 13px; background: var(--bg3); border: 1px solid var(--border); color: var(--text); font-family: 'Times New Roman', Times, serif; font-size: 16px; outline: none; margin-bottom: 0.6rem; border-radius: var(--radius); }
.modal-input:focus { border-color: var(--accent); }
.modal-btns { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 0.8rem; }
.modal-label { font-size: 13px; color: var(--text2); display: block; margin-bottom: 3px; font-family: 'DM Sans', sans-serif; }

/* ===========================
   TOAST
=========================== */
#toast { position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--accent); color: #fff; padding: 10px 18px; font-size: 14px; z-index: 9999; opacity: 0; transform: translateY(12px); transition: all 0.3s ease; pointer-events: none; border-radius: var(--radius); font-family: 'DM Sans', sans-serif; }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .home-img-col { justify-content: center; order: -1; }
  .home-content { order: 2; }
  .home-name, .home-role { text-align: center; }
  .home-img-frame { max-width: 340px; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-img-col { position: static; width: 100%; align-items: center; margin-bottom: 1.5rem; order: -1; }
  .about-img-box { max-width: 280px; min-height: 360px; height: auto !important; aspect-ratio: 2/3; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .contact-sub { white-space: normal; text-align: justify; }
  .port-grid, .blog-grid { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .cert-slide { padding: 1rem; flex-direction: column; height: auto; }
  .cert-carousel { height: auto; min-height: 300px; }
  .cert-img, .cert-img-ph { width: 100%; height: 180px; }
  .cert-info { padding-left: 0; padding-top: 0.75rem; }
  .home-btns { flex-direction: column; gap: 0.7rem; }
  .about-tabs { gap: 0.4rem; }
  .tab-btn { padding: 8px 14px; font-size: 14px; }
  .contact-icons { gap: 0.75rem; }
  .home-img-frame { max-width: 270px; }
  .about-img-box { max-width: 220px; min-height: 300px; }
  .skill-chips { gap: 0.5rem; }
  .skill-chip { padding: 6px 12px; font-size: 13px; }
}

/* ===========================
   BLOG READER MODAL
=========================== */
.blog-modal {
  display: none;
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  animation: blogFadeIn 0.3s ease both;
}
.blog-modal.open { display: block; }

@keyframes blogFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.blog-modal-inner {
  position: relative;
  max-width: 780px;
  margin: 48px auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
  animation: blogSlideUp 0.35s cubic-bezier(.4,0,.2,1) both;
  padding: 0 0 3rem;
  overflow: hidden;
}

@keyframes blogSlideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: none; }
}

.blog-modal-close {
  position: absolute; top: 1.1rem; right: 1.3rem;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg3);
  color: var(--text2); font-size: 20px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--tr); z-index: 10;
  font-family: 'DM Sans', sans-serif;
}
.blog-modal-close:hover {
  background: var(--accent); color: #fff; border-color: var(--accent);
  transform: rotate(90deg);
}

.blog-modal-content {
  padding: 3rem 3.5rem 0;
}

.blog-modal-date {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.75rem;
  font-family: 'DM Sans', sans-serif; text-align: left;
}

.blog-modal-title {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 400; line-height: 1.25;
  color: var(--text); margin-bottom: 1.4rem;
  letter-spacing: -0.01em;
}

.blog-modal-divider {
  width: 52px; height: 3px;
  background: var(--accent); border-radius: 2px;
  margin-bottom: 2rem;
}

.blog-modal-content p {
  font-size: 17px; line-height: 1.9;
  color: var(--text2); margin-bottom: 1.2rem;
  text-align: justify;
}
.blog-modal-content p.no-gap {
  margin-bottom: 1.2rem; line-height: 1.75;
}
.blog-modal-content p.no-gap br { display: block; content: ''; margin: 0; }

.blog-modal-content h2 {
  font-size: 20px; font-weight: 500;
  color: var(--text); margin: 2rem 0 0.75rem;
  letter-spacing: 0.01em;
}
.blog-modal-content h3 {
  font-size: 17px; font-weight: 500;
  color: var(--accent); margin: 1.2rem 0 0.5rem;
  letter-spacing: 0.01em;
}

.blog-modal-content ul,
.blog-modal-content ol {
  padding-left: 1.6rem;
  margin-bottom: 1.2rem;
  color: var(--text2);
}

.blog-modal-content li {
  font-size: 16px; line-height: 1.85;
  margin-bottom: 0.3rem;
}

.blog-modal-content strong {
  color: var(--text); font-weight: 500;
}

@media (max-width: 600px) {
  .blog-modal-inner { margin: 0; border-radius: 0; min-height: 100vh; }
  .blog-modal-content { padding: 2.5rem 1.5rem 0; }
}

/* ===========================
   CERT IMAGE FULLSCREEN VIEWER
=========================== */
.cert-viewer {
  display: none;
  position: fixed; inset: 0; z-index: 6000;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(10px);
  align-items: center; justify-content: center;
  animation: certViewerFade 0.25s ease both;
}
.cert-viewer.open { display: flex; }
@keyframes certViewerFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.cert-viewer img {
  max-width: 90vw; max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  animation: certViewerZoom 0.3s cubic-bezier(.4,0,.2,1) both;
  object-fit: contain;
}
@keyframes certViewerZoom {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}
.cert-viewer-close {
  position: fixed; top: 1.2rem; right: 1.4rem;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff; font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease; font-family: 'DM Sans', sans-serif;
  line-height: 1;
}
.cert-viewer-close:hover {
  background: var(--accent); border-color: var(--accent);
  transform: rotate(90deg);
}

/* ===========================
   CERT FULLSCREEN VIEWER
=========================== */
.cert-viewer-modal {
  display: none; position: fixed; inset: 0; z-index: 6000;
  background: rgba(0,0,0,0.92); backdrop-filter: blur(10px);
  align-items: center; justify-content: center;
  animation: blogFadeIn 0.25s ease both;
}
.cert-viewer-modal.open { display: flex; }
.cert-viewer-img {
  max-width: 90vw; max-height: 88vh;
  object-fit: contain; border-radius: 10px;
  box-shadow: 0 32px 100px rgba(0,0,0,0.7);
  animation: blogSlideUp 0.3s cubic-bezier(.4,0,.2,1) both;
}
.cert-viewer-close {
  position: fixed; top: 1.2rem; right: 1.4rem;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08);
  color: #fff; font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease; font-family: 'DM Sans', sans-serif; z-index: 6001;
}
.cert-viewer-close:hover { background: rgba(255,255,255,0.18); transform: rotate(90deg); }

/* ===========================
   CODE BLOCKS IN BLOG MODAL
=========================== */
.blog-modal-subtitle {
  font-size: 15px; color: var(--text3); margin-bottom: 1.2rem;
  font-style: italic;
}
.code-block {
  background: #0d1117; border: 1px solid #30363d;
  border-radius: 10px; padding: 1.2rem 1.5rem;
  margin: 0.8rem 0 1.4rem; overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13.5px; line-height: 1.85; white-space: pre;
  position: relative;
}
.code-block::before {
  content: attr(data-lang);
  position: absolute; top: 0.5rem; right: 0.9rem;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: #484f58; font-family: 'DM Sans', sans-serif;
}
/* Syntax token colors */
.c-kw   { color: #ff7b72; }   /* keywords: import, def, from, SELECT */
.c-fn   { color: #d2a8ff; }   /* functions: print(), read_csv() */
.c-str  { color: #a5d6ff; }   /* strings */
.c-num  { color: #79c0ff; }   /* numbers */
.c-name { color: #ffa657; }   /* module/class names */
.c-var  { color: #e6edf3; }   /* variables */
.c-type { color: #79c0ff; }   /* SQL types: VARCHAR, INT */
.c-comment { color: #8b949e; font-style: italic; } /* comments */
.c-punc { color: #e6edf3; }   /* punctuation */
.c-cmd  { color: #ff7b72; }   /* bash commands */
.c-plain{ color: #e6edf3; }   /* plain text */

/* Inline code */
code.inline-code {
  background: #161b22; border: 1px solid #30363d;
  border-radius: 5px; padding: 0.1em 0.45em;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px; color: #a5d6ff;
}

/* ===========================
   PROJECT MODAL (Lanka Smart Mart)
=========================== */
.proj-modal-inner { max-width: 820px; }

.proj-modal-content { padding: 3rem 3.5rem 0; }

.proj-subtitle {
  font-size: 13px; color: var(--text3); font-style: italic;
  margin-bottom: 1rem; line-height: 1.6;
}

.proj-h2 {
  font-size: 15px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  margin: 2rem 0 0.6rem; padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.proj-h3 {
  font-size: 13px; font-weight: 600;
  color: var(--text); margin: 1.2rem 0 0.4rem;
  letter-spacing: 0.03em;
}

.proj-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text3);
  margin: 1rem 0 0.3rem;
}

.proj-p {
  font-size: 13px; line-height: 1.8;
  color: var(--text2); margin-bottom: 0.8rem;
  text-align: justify;
}

.proj-ul, .proj-ol {
  padding-left: 1.4rem; margin-bottom: 0.8rem;
  color: var(--text2);
}

.proj-ul li, .proj-ol li {
  font-size: 13px; line-height: 1.8; margin-bottom: 0.25rem;
}

.proj-figma-link {
  display: inline-block; margin: 0.4rem 0 1rem;
  font-size: 12.5px; color: var(--accent);
  letter-spacing: 0.04em; transition: opacity var(--tr);
}
.proj-figma-link:hover { opacity: 0.75; }

/* Live Demo / View Repository pill buttons */
.proj-links {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin: 0.6rem 0 1.6rem;
}
.proj-link-primary, .proj-link-secondary {
  display: inline-block; padding: 10px 22px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  transition: all var(--tr);
}
.proj-link-primary { background: var(--accent); color: #0d0d12; }
.proj-link-primary:hover { opacity: 0.88; }
.proj-link-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.proj-link-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Dot indicators for map legend */
.dot {
  display: inline-block; width: 9px; height: 9px;
  border-radius: 50%; margin-right: 5px;
  vertical-align: middle; flex-shrink: 0;
}
.dot-green { background: #3fb950; }
.dot-red   { background: #f85149; }
.dot-gray  { background: #8b949e; }

/* Read more link inside port-card */
.proj-read {
  display: inline-block; margin-top: 0.8rem;
  font-size: 13px !important;
}

@media (max-width: 600px) {
  .proj-modal-content { padding: 2.5rem 1.5rem 0; }
}