/* base.css */
/* ==========================================
   BASE STYLES - Core Layout & Typography
   ========================================== */

:root {
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(168, 85, 247, 0.12);
  color: var(--accent-1);
  border: 1px solid var(--border-glass);
}

/* ============ LOADER ============ */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--orb-1-color);
  top: 10%;
  left: -10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: var(--orb-2-color);
  bottom: 10%;
  right: -10%;
  animation-delay: 5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--orb-3-color);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 10s;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 30px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid var(--border-glass);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-1);
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-1);
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-title .line {
  display: block;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-image-wrap {
  display: flex;
  justify-content: center;
}

.hero-image-card {
  position: relative;
  width: 320px;
  height: 380px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 0.15s ease-out;
}

.hero-image-glow {
  position: absolute;
  inset: -2px;
  background: var(--gradient-primary);
  border-radius: inherit;
  opacity: 0.4;
  filter: blur(20px);
  z-index: -1;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.scroll-line {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-1), transparent);
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0;
  }

  50% {
    transform: translateY(10px);
    opacity: 1;
  }
}

/* ============ ABOUT ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-line {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============ SKILLS ============ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.skill-category {
  padding: 32px;
  transition: var(--transition);
}

.skill-category:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.skill-category-header svg {
  color: var(--accent-1);
  flex-shrink: 0;
}

.skill-category-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.skill-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ PROJECTS ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ============ MODAL ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.modal-section p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.modal-section ul {
  list-style: none;
  padding: 0;
}

.modal-section li {
  padding: 6px 0 6px 20px;
  color: var(--text-secondary);
  line-height: 1.7;
  position: relative;
}

.modal-section li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-1);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.modal-cert-content {
  max-width: 900px;
  padding: 24px;
}

.cert-modal-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

/* ============ CERTIFICATIONS ============ */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.cert-logo {
  min-width: 56px;
  min-height: 56px;
  width: fit-content;
  height: auto;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  max-width: 100%;
  box-sizing: border-box;
}

.cert-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.cert-issuer {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cert-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ============ EDUCATION ============ */
.education-card {
  display: flex;
  gap: 24px;
  padding: 32px;
  transition: var(--transition);
}

.education-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.edu-icon {
  flex-shrink: 0;
}

.edu-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.edu-specialization {
  font-size: 0.95rem;
  color: var(--accent-1);
  margin-bottom: 8px;
}

.edu-institution {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.edu-board {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.edu-duration {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.edu-results {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.result-card {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  transition: var(--transition);
}

.result-card:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.result-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.result-card h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.result-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.result-meter {
  --arc: calc(var(--score) * 1%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, #141421 56%, transparent 57%),
    conic-gradient(var(--score-color) var(--arc), rgba(255, 255, 255, 0.1) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.result-meter span {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

.result-track {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.result-fill {
  height: 100%;
  width: calc(var(--score) * 1%);
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--score-color), #e879f9);
  transform-origin: left;
  transform: scaleX(0);
  animation: scoreGrow 1.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.result-card:nth-child(2) .result-fill {
  animation-delay: 0.15s;
}

.result-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.result-link {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  transition: var(--transition);
}

.result-link:hover {
  border-color: var(--border-glass);
  background: rgba(168, 85, 247, 0.12);
}

.result-link-download {
  background: rgba(255, 255, 255, 0.02);
}

@keyframes scoreGrow {
  to {
    transform: scaleX(1);
  }
}

/* ============ SIGMA PHILOSOPHY ============ */
.sigma-card {
  padding: 2.5rem 2rem;
  text-align: center;
  border-radius: 20px;
  overflow: visible;
}

.sigma-intro {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.sigma-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.pillar {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.02);
}

.pillar p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.pillar-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.pillar-title--primary {
  color: var(--accent-1);
}

.pillar-title--secondary {
  color: var(--accent-2);
}

.sigma-conclusion {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

/* ============ CONTACT ============ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ============ CURSOR GLOW ============ */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.15), transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s;
  will-change: transform;
}

.cursor-glow.active {
  opacity: 1;
}

@media (pointer: coarse) {
  .cursor-glow {
    display: none !important;
  }
}