/* ==========================================================
   Kasun Wijekoon - Elite Tech Dark Theme Portfolio Stylesheet
   ========================================================== */

:root {
  --bg-primary: #070c16;
  --bg-secondary: #0c1424;
  --bg-card: rgba(13, 21, 38, 0.72);
  --bg-card-hover: rgba(18, 30, 54, 0.88);
  --border-card: rgba(56, 189, 248, 0.16);
  --border-card-hover: rgba(0, 240, 255, 0.55);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #00f0ff;
  --accent-blue: #38bdf8;
  --accent-deep: #0284c7;
  --accent-emerald: #10b981;
  --accent-glow: rgba(0, 240, 255, 0.25);
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body.dark-theme {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Glowing Orbs */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.32;
}
.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #0284c7, transparent 70%);
  top: -120px;
  right: -80px;
}
.orb-2 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #0369a1, transparent 70%);
  top: 45%;
  left: -200px;
}
.orb-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #0e7490, transparent 70%);
  bottom: -60px;
  right: 8%;
}

.container {
  width: 90%;
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Typography & Helpers */
.text-gradient {
  background: linear-gradient(135deg, #00f0ff 0%, #38bdf8 55%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-cyan {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* Glassmorphism Card Style */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  transition: var(--transition);
}
.glass:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  box-shadow: 0 12px 35px rgba(0, 240, 255, 0.09);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  background: rgba(7, 12, 22, 0.78);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}
.navbar.scrolled {
  padding: 0.85rem 0;
  background: rgba(7, 12, 22, 0.94);
  border-bottom-color: var(--border-card);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-logo {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.brand-logo .bracket {
  color: var(--accent-cyan);
}
.brand-logo .dot {
  color: #38bdf8;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
}
.nav-link:hover {
  color: var(--accent-cyan);
}
.nav-btn-cta {
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-cyan) !important;
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 0.45rem 1.15rem;
  border-radius: 30px;
}
.nav-btn-cta:hover {
  background: var(--accent-cyan);
  color: var(--bg-primary) !important;
  box-shadow: 0 0 16px var(--accent-glow);
}
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.menu-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #0284c7 100%);
  color: #070c16;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.25);
  border: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(0, 240, 255, 0.42);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.btn-outline:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.06);
}
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Hero Section */
.hero-section {
  padding: 9.5rem 0 5rem 0;
  min-height: 88vh;
  display: flex;
  align-items: center;
}
.hero-container {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  align-items: center;
  gap: 4rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 0.35rem 0.95rem;
  border-radius: 30px;
  font-size: 0.85rem;
  color: var(--accent-blue);
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}
.hero-subtitle {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2.25rem;
}
.hero-subtitle strong {
  color: var(--text-primary);
}
.hero-cta-group {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* Profile Photo Frame */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.profile-frame {
  position: relative;
  width: 100%;
  max-width: 380px;
}
.profile-glow {
  position: absolute;
  inset: -10px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.35), rgba(2, 132, 199, 0.2));
  border-radius: 24px;
  filter: blur(25px);
  z-index: 0;
}
.profile-img {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  z-index: 1;
}
.profile-badge {
  position: absolute;
  bottom: -15px;
  left: 20px;
  right: 20px;
  background: rgba(13, 21, 38, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card-hover);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 2;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.badge-icon {
  font-size: 1.4rem;
}
.badge-text {
  display: flex;
  flex-direction: column;
}
.badge-text strong {
  font-size: 0.92rem;
  color: var(--text-primary);
}
.badge-text span {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

/* Metrics Strip */
.metrics-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 1.4rem 1.75rem;
}
.metric-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.metric-number {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}
.metric-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.metric-divider {
  width: 1px;
  height: 38px;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Section Common */
.section {
  padding: 5.5rem 0;
  position: relative;
  z-index: 1;
}
.section-header {
  margin-bottom: 3.5rem;
  text-align: center;
}
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.65rem;
}
.section-title {
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 2rem;
}
.about-card {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.about-text {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.75;
}
.about-text strong {
  color: var(--text-primary);
}
.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}
.badge {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.22);
  color: var(--accent-cyan);
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.about-quicklinks {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}
.quicklinks-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.75rem;
}
.platform-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.platform-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  text-decoration: none;
  transition: var(--transition);
}
.platform-item:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--accent-cyan);
  transform: translateX(4px);
}
.platform-info {
  display: flex;
  flex-direction: column;
}
.platform-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}
.platform-sub {
  color: var(--text-muted);
  font-size: 0.78rem;
}
.platform-arrow {
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Timeline (Experience) */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 7px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-cyan), rgba(56, 189, 248, 0.2));
}
.timeline-item {
  position: relative;
}
.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 2rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}
.timeline-card {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1rem;
}
.role-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}
.company-name {
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 0.98rem;
  margin-top: 0.2rem;
}
.role-period {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  white-space: nowrap;
}
.role-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.role-bullets li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  position: relative;
  padding-left: 1.4rem;
}
.role-bullets li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-weight: bold;
}
.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.role-tags span {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent-blue);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
}
.project-card {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.project-pill {
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-cyan);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-mono);
}
.project-metric {
  font-size: 0.82rem;
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  font-weight: 600;
}
.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.project-desc {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.65;
}
.project-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 1.15rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.highlight-item {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.highlight-item strong {
  color: var(--text-primary);
}
.project-tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.project-tech-pills span {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent-blue);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}
.project-action {
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Core Technical Pillars */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.pillar-card {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.pillar-wide {
  grid-column: 1 / -1;
}
.pillar-icon {
  font-size: 2.2rem;
}
.pillar-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-cyan);
}
.pillar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.pillar-list li {
  color: var(--text-secondary);
  font-size: 0.92rem;
  position: relative;
  padding-left: 1.25rem;
}
.pillar-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}
.horizontal-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

/* Education Grid */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}
.edu-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.edu-year {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  align-self: flex-start;
}
.edu-degree {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}
.edu-inst {
  color: var(--accent-blue);
  font-size: 0.92rem;
  font-weight: 600;
}
.edu-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-top: 0.25rem;
}

/* Contact Section */
.contact-card {
  padding: 4rem 3rem;
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
}
.contact-header {
  margin-bottom: 2.75rem;
}
.contact-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.contact-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0 auto;
}
.contact-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  text-align: left;
  margin-bottom: 3rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.contact-info-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.info-label {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.info-value, .info-value a {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition);
}
.info-value a:hover {
  color: var(--accent-cyan);
}
.info-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.link-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  text-decoration: none;
  transition: var(--transition);
}
.link-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}
.contact-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 1;
}
.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3.5rem;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .metrics-strip {
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
  }
  .metric-divider {
    display: none;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .pillars-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem;
  }
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(7, 12, 22, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-card);
    transform: translateY(-160%);
    transition: transform 0.3s ease-in-out;
  }
  .nav-menu.active {
    transform: translateY(0);
  }
  .menu-toggle {
    display: flex;
  }
  .timeline-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .contact-card {
    padding: 2.5rem 1.5rem;
  }
  .footer-container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
