:root {
  color-scheme: dark;
  --bg: #0f172a;
  --brand-navy: #071225;
  --bg-2: #1e293b;
  --primary: #3b82f6;
  --accent: #06b6d4;
  --text: #ffffff;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.14);
  --glass: rgba(15, 23, 42, 0.72);
  --card: rgba(30, 41, 59, 0.58);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 12%, rgba(6, 182, 212, 0.16), transparent 26rem),
    radial-gradient(circle at 12% 22%, rgba(59, 130, 246, 0.14), transparent 24rem),
    linear-gradient(135deg, var(--bg), #111827 56%, var(--bg));
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.material-symbols-rounded {
  direction: ltr;
  display: inline-block;
  flex: 0 0 auto;
  font-family: "Material Symbols Rounded";
  font-feature-settings: "liga";
  font-size: 1.15em;
  font-style: normal;
  font-weight: normal;
  letter-spacing: normal;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
}

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

#particleCanvas,
.cursor-glow {
  inset: 0;
  pointer-events: none;
  position: fixed;
}

#particleCanvas {
  opacity: 0.36;
  z-index: -2;
}

.cursor-glow {
  background: radial-gradient(circle 18rem at var(--x, 50%) var(--y, 50%), rgba(59, 130, 246, 0.16), transparent 70%);
  z-index: -1;
}

.progress {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  height: 3px;
  left: 0;
  position: fixed;
  top: 0;
  transform-origin: left;
  width: 100%;
  z-index: 20;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(7, 18, 37, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  left: 0;
  padding: 0.9rem clamp(1rem, 4vw, 4rem);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 15;
}

.brand,
.header-actions,
.nav,
.hero-actions,
.filters,
.tags,
.specialties {
  align-items: center;
  display: flex;
}

.brand {
  font-weight: 800;
  gap: 0.7rem;
}

.project-shot {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: grid;
  font-family: Poppins, sans-serif;
  font-weight: 800;
  place-items: center;
}

.brand-logo {
  object-fit: contain;
  width: min(14rem, 42vw);
}

.nav {
  gap: 1.2rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.nav a:hover {
  color: var(--text);
}

.header-actions {
  gap: 0.6rem;
}

.icon-btn,
.menu-btn,
.back-top,
.modal-close {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
}

.icon-btn,
.menu-btn,
.back-top {
  border-radius: 8px;
  height: 2.65rem;
  width: 2.65rem;
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 0.28rem;
  justify-content: center;
  padding: 0.7rem;
}

.menu-btn span {
  background: var(--text);
  border-radius: 99px;
  height: 2px;
  width: 100%;
}

.download-btn,
.primary-btn,
.secondary-btn,
.project-open,
.filter {
  border-radius: 8px;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.download-btn,
.primary-btn {
  align-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: 0;
  color: white;
  display: inline-flex;
  gap: 0.45rem;
  justify-content: center;
  padding: 0.78rem 1rem;
}

.secondary-btn,
.project-open,
.filter {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
  display: inline-flex;
  gap: 0.45rem;
  justify-content: center;
  padding: 0.76rem 1rem;
}

.download-btn:hover,
.primary-btn:hover,
.secondary-btn:hover,
.project-open:hover,
.filter:hover {
  transform: translateY(-2px);
}

.section {
  margin-inline: auto;
  max-width: 1180px;
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 2rem);
}

.hero {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  min-height: calc(100vh - 76px);
}

.eyebrow {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 1rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Poppins, Inter, sans-serif;
  line-height: 1.05;
  margin: 0;
}

h1 {
  font-size: clamp(3.2rem, 6vw, 5.6rem);
  max-width: 9ch;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 4rem);
}

h3 {
  font-size: 1.2rem;
}

.role {
  color: var(--primary);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 800;
  margin: 1.2rem 0;
}

.summary,
.about-content p,
.contact-item,
.service-card p,
.skill-card p,
.project-card p,
.timeline-details,
.education-card p {
  color: var(--muted);
}

.education-card h4 {
  font-size: 1rem;
  margin: 1.2rem 0 0.7rem;
}

.course-list {
  color: var(--muted);
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
  list-style: none;
  padding-left: 0;
}

.course-list a {
  align-items: center;
  color: var(--accent);
  display: inline-flex;
  gap: 0.4rem;
  font-weight: 800;
}

.summary {
  font-size: 1.1rem;
  max-width: 64ch;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.hero-panel,
.skill-card,
.project-card,
.service-card,
.education-card,
.contact-item,
.timeline-item {
  backdrop-filter: blur(18px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 1.25rem;
}

.availability {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-weight: 800;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.availability span {
  animation: pulse 1.8s infinite;
  background: #22c55e;
  border-radius: 999px;
  height: 0.7rem;
  width: 0.7rem;
}

.profile-card {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto 1fr;
  margin-bottom: 1rem;
}

.avatar {
  border-radius: 50%;
  width: 6rem;
  height: auto;
}

.profile-card p {
  color: var(--muted);
  margin: 0.4rem 0 0;
}

.terminal-mini {
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(6, 182, 212, 0.24);
  border-radius: 8px;
  color: #c4f1ff;
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.terminal-mini code {
  white-space: normal;
}

.split {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
}

.about-content p {
  font-size: 1.05rem;
  margin-top: 0;
}

.specialties,
.tags,
.filters {
  flex-wrap: wrap;
  gap: 0.6rem;
}

.specialties span,
.tags span {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.83rem;
  font-weight: 800;
  padding: 0.4rem 0.7rem;
}

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

.timeline-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.2rem;
  text-align: left;
  width: 100%;
}

.timeline-toggle span {
  color: var(--accent);
  flex: 0 0 8rem;
  font-weight: 800;
  white-space: nowrap;
}

.timeline-details {
  display: none;
  padding: 0 1.2rem 1.2rem;
}

.timeline-item.open .timeline-details {
  display: block;
}

.tech {
  color: var(--text);
  font-weight: 800;
  margin-bottom: 0;
}

.skills-grid,
.project-grid,
.service-grid,
.contact-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 2rem;
}

.skill-card,
.project-card,
.service-card,
.education-card,
.contact-item {
  padding: 1.25rem;
}

.skill-card h3,
.service-card h3,
.project-card h3 {
  margin-bottom: 0.75rem;
}

.stack-marquee {
  border-block: 1px solid var(--line);
  margin-top: 2rem;
  overflow: hidden;
  padding: 1rem 0;
}

.stack-marquee div {
  animation: marquee 18s linear infinite;
  display: flex;
  gap: 2rem;
  width: max-content;
}

.stack-marquee span {
  color: var(--muted);
  font-weight: 900;
}

.filters {
  margin-top: 1.6rem;
}

.filter.active {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.55);
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 21rem;
}

.project-card .tags {
  margin-bottom: 1.1rem;
}

.project-shot {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  font-size: 2.2rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.project-logo {
  background: rgba(255, 255, 255, 0.92);
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 1rem;
}

.project-logo img {
  height: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  width: auto;
}

.logo-dark {
  background: #06111f;
}

.logo-light {
  background: #f8fafc;
}

.project-cover {
  padding: 0;
}

.project-cover img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.project-open {
  margin-top: auto;
}

.contact-list {
  grid-template-columns: repeat(5, 1fr);
}

.contact-item {
  align-items: flex-start;
  display: grid;
  gap: 0.45rem;
}

.contact-item > .material-symbols-rounded {
  color: var(--accent);
  font-size: 1.6rem;
}

.contact-item strong {
  color: var(--text);
}

.contact-item span:last-child {
  overflow-wrap: anywhere;
}

.palette input,
.terminal-mode input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 0.86rem;
  width: 100%;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 2rem clamp(1rem, 4vw, 4rem);
}

.site-footer p,
.copyright {
  color: var(--muted);
  margin: 0;
}

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

.project-modal,
.palette {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--text);
  max-width: 720px;
  width: min(92vw, 720px);
}

.project-modal::backdrop,
.palette::backdrop {
  backdrop-filter: blur(8px);
  background: rgba(2, 6, 23, 0.72);
}

.modal-close {
  border-radius: 8px;
  float: right;
  font-size: 1.5rem;
  height: 2.4rem;
  width: 2.4rem;
}

.palette-box {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.command-output {
  color: var(--muted);
}

.terminal-mode {
  background: #020617;
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 8px;
  bottom: 1rem;
  box-shadow: var(--shadow);
  color: #c4f1ff;
  left: 1rem;
  max-width: 560px;
  padding: 1rem;
  position: fixed;
  right: 1rem;
  z-index: 30;
}

.terminal-mode pre {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 600ms ease, transform 600ms ease;
}

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

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 900px) {
  .menu-btn {
    display: flex;
  }

  .download-btn {
    display: none;
  }

  .nav {
    align-items: stretch;
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid var(--line);
    display: none;
    flex-direction: column;
    left: 0;
    padding: 1rem;
    position: fixed;
    right: 0;
    top: 72px;
    z-index: 17;
  }


  body.menu-open .nav {
    display: flex;
  }

  .hero,
  .split,
  .contact-list {
    grid-template-columns: 1fr;
  }

  .skills-grid,
  .project-grid,
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: auto;
    padding-top: 5rem;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding-inline: 1rem;
  }

  .brand-logo {
    width: min(11rem, 42vw);
  }

  .skills-grid,
  .project-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .timeline-toggle {
    align-items: flex-start;
    flex-direction: column;
  }

  .stack-marquee div {
    animation: none;
    flex-wrap: wrap;
    gap: 1rem;
    transform: none;
    width: 100%;
  }

  h1 {
    font-size: 3.1rem;
  }
}

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