:root {
  /* Light Modern Tech Palette */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-section-alt: #f1f5f9;
  
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.22);
  --accent: #0ea5e9;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  
  --border-light: #e2e8f0;
  --border-card: #cbd5e1;
  --border-active: #38bdf8;
  
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 12px 30px -8px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.65;
  overflow-x: hidden;
}

.container {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

/* Floating Quick Copy Button */
.floating-copy-btn {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.1);
  cursor: pointer;
  transition: all 0.25s ease;
}
.floating-copy-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Typography & Utilities */
h1, h2, h3, h4, .font-en { font-family: 'Plus Jakarta Sans', 'Prompt', sans-serif; }
.text-primary-gradient {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0369a1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.35);
  background: #0284c7;
}
.btn-secondary {
  background: #ffffff;
  border-color: var(--border-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-2px);
}
.btn-white {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}
.btn-white:hover {
  transform: translateY(-2px);
  background: #f8fafc;
}

/* Header & Nav */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
}
.nav-inner {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-main);
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 22px;
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }
.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-main);
  font-size: 20px;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 85px 0 90px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, rgba(248, 250, 252, 0) 70%);
  filter: blur(70px);
  z-index: 0;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}
.hero-content h1 {
  font-size: clamp(38px, 4.4vw, 56px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 18px 0 16px;
}
.hero-content p {
  color: var(--text-muted);
  font-size: 16.5px;
  max-width: 580px;
  margin-bottom: 32px;
  font-weight: 400;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Dev Profile Card */
.dev-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
}
.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.mac-dots { display: flex; gap: 7px; }
.mac-dots span { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-r { background: #f87171; } .dot-y { background: #fbbf24; } .dot-g { background: #34d399; }
.card-tag { font-size: 12px; color: var(--text-dim); font-family: monospace; font-weight: 600; }
.profile-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.avatar-img {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid var(--primary);
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.profile-info h3 { font-size: 17px; margin-bottom: 2px; }
.profile-info p { font-size: 13px; color: var(--text-muted); }

/* Code preview inside card */
.code-preview {
  background: #0f172a;
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: Consolas, monospace;
  font-size: 12.5px;
  color: #e2e8f0;
  line-height: 1.6;
}
.code-preview .kw { color: #f472b6; }
.code-preview .fn { color: #38bdf8; }
.code-preview .str { color: #a7f3d0; }

.card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
  text-align: center;
}
.metric-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 10px;
  border-radius: var(--radius-md);
}
.metric-box strong { display: block; font-size: 16px; color: var(--primary); }
.metric-box small { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* Highlights Strip */
.stats-strip {
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: #ffffff;
  padding: 34px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat-item {
  display: flex;
  gap: 16px;
  align-items: center;
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #e0f2fe;
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-item strong { display: block; font-size: 15px; font-weight: 600; color: var(--text-main); }
.stat-item small { font-size: 12.5px; color: var(--text-muted); }

/* Section Generic */
.section { padding: 95px 0; }
.section-alt { background-color: var(--bg-section-alt); }
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 55px;
}
.section-header h2 {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 10px 0 14px;
}
.section-header p {
  color: var(--text-muted);
  font-size: 15.5px;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-card);
}
.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #e0f2fe;
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 22px;
}
.service-card h3 { font-size: 19px; margin-bottom: 10px; font-weight: 600; }
.service-card p { font-size: 13.5px; color: var(--text-muted); margin-bottom: 18px; line-height: 1.6; }
.service-tech-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.service-tech-tags span {
  font-size: 11.5px;
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  padding: 3px 9px;
  border-radius: 6px;
  color: #334155;
  font-weight: 500;
}

/* Projects Showcase */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-card);
}
.project-img-wrapper {
  height: 195px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
  background: #e2e8f0;
}
.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-card:hover .project-img {
  transform: scale(1.05);
}
.project-body {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.project-body h3 { font-size: 18px; margin: 8px 0 10px; }
.project-body p { font-size: 13.5px; color: var(--text-muted); margin-bottom: 18px; flex-grow: 1; }
.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}
.meta-tag {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.project-meta a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.project-meta a:hover {
  text-decoration: underline;
}

/* Tech Stack Matrix */
.stack-box {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.stack-col h4 {
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}
.stack-col ul { list-style: none; }
.stack-col li {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.stack-col li:before {
  content: "•";
  color: var(--primary);
  font-weight: bold;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.about-card {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 38px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.about-card:after {
  content: "PGS";
  position: absolute;
  right: -20px;
  bottom: -40px;
  font-size: 170px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.03);
  pointer-events: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.about-card h3 { font-size: 24px; margin-bottom: 14px; }
.about-card p { color: var(--text-muted); font-size: 15px; margin-bottom: 20px; }
.principle-list { list-style: none; }
.principle-list li {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  font-size: 14.5px;
  color: #334155;
}
.principle-list span {
  color: var(--primary);
  font-weight: 800;
}

/* Contact CTA */
.contact-cta {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-radius: 28px;
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(2, 132, 199, 0.25);
}
.contact-cta h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 10px; color: #fff; }
.contact-cta p { color: #e0f2fe; max-width: 500px; }

/* Footer */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 35px 0;
  font-size: 13px;
  color: var(--text-dim);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  place-items: center;
  padding: 20px;
}
.modal.active { display: grid; }
.modal-box {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.2);
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
}
.modal-close:hover { color: var(--text-main); }

/* Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1001;
  background: var(--text-main);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}
.toast-msg.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid, .project-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .contact-cta { flex-direction: column; text-align: center; }
  .contact-cta p { margin: 0 auto 20px; }
}

@media (max-width: 680px) {
  .menu-btn { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
  }
  .nav-links.open { display: flex; }
  .services-grid, .project-grid, .stats-grid, .stack-grid { grid-template-columns: 1fr; }
  .hero { padding: 45px 0 60px; }
  .floating-copy-btn { top: auto; bottom: 20px; right: 20px; }
}