/* Modern portfolio styles with a dark gradient theme, glassmorphism, and responsive layout */
:root {
  --bg: #090b16;
  --surface: rgba(14, 20, 40, 0.82);
  --surface-soft: rgba(18, 27, 55, 0.9);
  --surface-strong: rgba(12, 18, 32, 0.96);
  --text: #e8eefb;
  --muted: #9aa3c4;
  --accent: #6a4ce8;
  --accent-soft: #3a8dff;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 80px rgba(4, 9, 23, 0.35);
  --radius: 28px;
  --transition: 0.35s ease;
  --background: radial-gradient(circle at top left, rgba(58, 141, 255, 0.16), transparent 22%),
    radial-gradient(circle at bottom right, rgba(106, 76, 232, 0.2), transparent 20%),
    linear-gradient(180deg, #070a15 0%, #090b16 45%, #070a15 100%);
}

body.light {
  --bg: #f5f7ff;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(243, 246, 255, 0.95);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --text: #111827;
  --muted: #4b5563;
  --accent: #4f46e5;
  --accent-soft: #2563eb;
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
  --background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.12), transparent 20%),
    radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.12), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, #eef2ff 45%, #f8fbff 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

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

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

button, input, textarea {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  margin-bottom: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(8, 12, 26, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  box-shadow: 0 0 18px rgba(58, 141, 255, 0.45);
}

.site-nav {
  display: none;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-nav a {
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle,
.nav-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  width: 3rem;
  height: 3rem;
  border-radius: 16px;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition);
}

.theme-toggle:hover,
.nav-toggle:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle span {
  display: block;
  width: 1.2rem;
  height: 2px;
  margin: 0.35rem auto;
  background: var(--text);
  border-radius: 999px;
}

.hero {
  position: relative;
  overflow: hidden;
}

.particle-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 2rem;
  align-items: center;
  min-height: calc(100vh - 120px);
  z-index: 1;
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-soft);
  font-size: 0.78rem;
  margin-bottom: 1rem;
}

.hero-copy h1 {
  font-size: clamp(2.75rem, 5vw, 4.75rem);
  margin: 0;
  line-height: 0.95;
}

.hero-copy h1 span {
  color: var(--accent);
}

.hero-lead {
  max-width: 34rem;
  color: var(--muted);
  margin: 1.5rem 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.6rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  color: #fff;
}

.btn-secondary,
.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.hero-highlights {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-highlights div {
  display: grid;
  gap: 0.25rem;
  padding: 1.3rem 1.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
}

.hero-highlights strong {
  font-size: 0.95rem;
}

.hero-card {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
}

.hero-avatar {
  position: relative;
  width: min(420px, 100%);
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: radial-gradient(circle at top left, rgba(58, 141, 255, 0.35), transparent 45%),
    radial-gradient(circle at bottom right, rgba(106, 76, 232, 0.35), transparent 40%),
    linear-gradient(180deg, rgba(31, 43, 75, 0.95), rgba(8, 13, 29, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.avatar-ring,
.avatar-shadow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.avatar-ring {
  border: 2px solid rgba(106, 76, 232, 0.35);
  filter: blur(0.5px);
}

.avatar-shadow {
  box-shadow: inset 0 0 70px rgba(10, 15, 35, 0.55);
}

.avatar-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.hero-stats {
  width: 100%;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card {
  padding: 1.35rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 24px;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  color: var(--muted);
}

.section-header {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: clamp(2rem, 3vw, 2.75rem);
  margin: 0;
}

.section-header p {
  color: var(--muted);
  max-width: 720px;
}

.about-grid,
.project-grid,
.certificate-grid,
.achievement-grid,
.contact-grid,
.skills-grid {
  display: grid;
  gap: 1.5rem;
}

.about-grid {
  grid-template-columns: 1fr;
}

.glass-card {
  padding: 2rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.glass-card h3 {
  margin-top: 0;
}

.timeline {
  display: grid;
  gap: 1.5rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
}

.timeline-marker {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  box-shadow: 0 0 18px rgba(58, 141, 255, 0.35);
  margin-top: 0.5rem;
}

.timeline-content {
  padding: 1.75rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-content h3 {
  margin: 0 0 0.35rem;
}

.timeline-content span {
  display: inline-flex;
  color: var(--accent-soft);
  margin-bottom: 1rem;
}

.skills-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.skill-card {
  padding: 1.5rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.skill-card h3 {
  margin-bottom: 1rem;
}

.skill-bar {
  width: 100%;
  height: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.skill-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
}

.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card,
.certificate-card,
.achievement-card,
.contact-details,
.contact-form {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.project-card {
  display: grid;
  gap: 1rem;
}

.project-image {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, rgba(58, 141, 255, 0.2), rgba(106, 76, 232, 0.22));
}

.project-info {
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.project-tags span {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.85rem;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.certificate-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.certificate-card {
  padding: 2rem;
  display: grid;
  gap: 1rem;
}

.certificate-icon {
  font-size: 2rem;
}

.certificate-date {
  color: var(--muted);
  font-size: 0.95rem;
}

.achievement-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.achievement-card {
  padding: 2rem;
}

.contact-grid {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.contact-details {
  padding: 2rem;
}

.contact-details h2 {
  margin-top: 0.75rem;
}

.contact-info {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-info div {
  display: grid;
  gap: 0.35rem;
}

.contact-info strong {
  color: var(--accent-soft);
}

.contact-info span {
  color: var(--text);
}

.contact-form {
  padding: 2rem;
  display: grid;
  gap: 1rem;
}

.form-group {
  display: grid;
  gap: 0.65rem;
}

.form-group label {
  color: var(--muted);
  font-size: 0.92rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(58, 141, 255, 0.75);
  box-shadow: 0 0 0 4px rgba(58, 141, 255, 0.08);
}

.form-feedback {
  color: var(--accent-soft);
  font-size: 0.95rem;
  min-height: 1.4rem;
}

.site-footer {
  padding: 2rem 0 3rem;
}

.footer-inner {
  display: grid;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  grid-template-columns: 1fr;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-socials a,
.back-to-top {
  color: var(--muted);
  transition: color var(--transition);
}

.footer-socials a:hover,
.back-to-top:hover {
  color: var(--text);
}

.back-to-top {
  justify-self: start;
}

.loading-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 1rem;
  background: rgba(7, 11, 22, 0.96);
  color: #fff;
  z-index: 9999;
}

.loader {
  width: 3rem;
  height: 3rem;
  border: 5px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent-soft);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.progress-container {
  position: fixed;
  inset: 0 0 auto 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 1000;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 768px) {
  .site-nav {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
  .about-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .header-inner {
    gap: 2rem;
  }

  .hero {
    padding-top: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 767px) {
  .section {
    padding: 3rem 0;
  }
  .site-nav {
    position: absolute;
    top: 100%;
    right: 1rem;
    left: 1rem;
    background: rgba(6, 10, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 1rem 1.2rem;
    flex-direction: column;
    display: none;
  }
  .site-nav.open {
    display: flex;
  }
  .hero-highlights {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    text-align: center;
    grid-template-columns: 1fr;
  }
  .back-to-top {
    justify-self: center;
  }
}
