:root {
  --bg-900: #130606;
  --bg-800: #200b0b;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-strong: rgba(255, 255, 255, 0.16);
  --stroke: rgba(255, 255, 255, 0.25);
  --text: #f3f7ff;
  --text-soft: rgba(243, 247, 255, 0.74);
  --accent: #ff3a3a;
  --accent-2: #ff8b8b;
  --warm: #ff7a55;
  --radius: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 18% -10%, #5a1212 0%, var(--bg-900) 56%),
    linear-gradient(145deg, #1a0505 0%, #250b0b 70%, #311010 100%);
  overflow-x: hidden;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(66px);
  mix-blend-mode: screen;
  opacity: 0.84;
}

.blob-a {
  width: 44vw;
  height: 44vw;
  max-width: 620px;
  max-height: 620px;
  background: radial-gradient(circle, rgba(255, 58, 58, 0.88), rgba(255, 58, 58, 0.18) 62%, transparent 72%);
  left: -12vw;
  top: -14vw;
  animation: driftA 18s ease-in-out infinite;
}

.blob-b {
  width: 40vw;
  height: 40vw;
  max-width: 560px;
  max-height: 560px;
  background: radial-gradient(circle, rgba(255, 139, 139, 0.8), rgba(255, 139, 139, 0.14) 58%, transparent 75%);
  right: -10vw;
  top: 16vh;
  animation: driftB 24s ease-in-out infinite;
}

.blob-c {
  width: 48vw;
  height: 48vw;
  max-width: 720px;
  max-height: 720px;
  background: radial-gradient(circle, rgba(255, 122, 85, 0.68), rgba(255, 58, 58, 0.18) 55%, transparent 76%);
  left: 26vw;
  bottom: -16vw;
  animation: driftC 22s ease-in-out infinite;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.09;
  background-image: radial-gradient(rgba(255, 255, 255, 0.85) 0.6px, transparent 0.8px);
  background-size: 4px 4px;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.show {
  animation: fadeUp 0.7s cubic-bezier(0.2, 0.75, 0.22, 1) forwards;
}

.nav-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 1rem auto 0;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand-link {
  text-decoration: none;
  color: inherit;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-mark {
  width: 32px;
  aspect-ratio: 1;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--accent-2), var(--accent), #ff6666);
  box-shadow: 0 8px 24px rgba(255, 58, 58, 0.44);
}

.brand-top {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  margin: 0;
}

.brand-bottom {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-soft);
}

.nav-actions {
  display: flex;
  gap: 0.7rem;
}

.nav-actions a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.84rem;
  padding: 0.35rem 0.66rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.nav-actions a:hover {
  border-color: rgba(255, 255, 255, 0.27);
  background: rgba(255, 255, 255, 0.08);
}

.portfolio-layout {
  width: min(1120px, calc(100% - 2rem));
  margin: 1.25rem auto 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.hero,
.glass-panel {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero {
  padding: clamp(1.4rem, 3vw, 2.4rem);
}

.kicker,
.section-tag,
.project-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 600;
}

.hero h1 {
  margin: 0.55rem 0 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(1.8rem, 5.4vw, 3.35rem);
  line-height: 1.04;
  max-width: 18ch;
}

.hero-copy {
  margin: 0.82rem 0 0;
  max-width: 64ch;
  color: var(--text-soft);
  font-size: clamp(1rem, 2.1vw, 1.12rem);
}

.cta-row {
  margin-top: 1.1rem;
  display: flex;
  gap: 0.72rem;
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 0.72rem 1rem;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #f6fbff;
  background: linear-gradient(135deg, var(--accent), #ff6464);
  box-shadow: 0 10px 24px rgba(255, 58, 58, 0.34);
}

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

.hero-metrics {
  margin-top: 1rem;
  display: grid;
  gap: 0.72rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.metric {
  padding: 0.85rem;
  border-radius: 18px;
}

.metric-label {
  margin: 0;
  font-size: 0.74rem;
  color: var(--text-soft);
}

.metric-value {
  margin: 0.35rem 0 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.35rem 0.68rem;
  border-radius: 999px;
  color: #fff4f4;
  background: linear-gradient(135deg, #ff7272, #e93f3f);
  transition: opacity 0.28s ease, filter 0.28s ease;
}

.status-badge.dim {
  opacity: 0.62;
  filter: saturate(0.8);
}

.stack {
  display: grid;
  gap: 1rem;
}

.intro-card,
.toolbox-card,
.section,
.contact-panel {
  padding: clamp(1rem, 2.4vw, 1.4rem);
}

.intro-card h2 {
  margin: 0.5rem 0 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.intro-card p {
  color: var(--text-soft);
  line-height: 1.5;
}

.chip-list {
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip-list li {
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
}

.section-head h3 {
  margin: 0.44rem 0 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(1.2rem, 3.2vw, 1.9rem);
}

.skills-grid {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.85rem;
}

.skill-card {
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.skill-card h4 {
  margin: 0;
  font-size: 1rem;
}

.skill-meter {
  margin-top: 0.72rem;
}

.skill-meter p {
  margin: 0 0 0.32rem;
  font-size: 0.84rem;
  color: var(--text-soft);
}

.meter-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.meter-fill {
  width: 0;
  height: 100%;
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9b9b, #ff5f5f, #ff3a3a);
  box-shadow: 0 0 12px rgba(255, 58, 58, 0.52);
  transition: width 1s cubic-bezier(0.2, 0.75, 0.22, 1);
}

.meter-fill.ready {
  width: var(--level);
}

.projects-grid {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.85rem;
}

.project-card {
  padding: 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.project-card h4 {
  margin: 0.45rem 0 0;
  font-size: 1.06rem;
}

.project-card p {
  margin: 0.45rem 0 0;
  color: var(--text-soft);
  line-height: 1.45;
}

.timeline {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.85rem;
}

.timeline article {
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.timeline-role {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.timeline-meta {
  margin: 0.24rem 0 0;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.timeline article p:last-child {
  margin: 0.42rem 0 0;
  color: var(--text-soft);
  line-height: 1.45;
}

.contact {
  display: grid;
}

.contact-panel h3 {
  margin: 0.45rem 0 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(1.2rem, 3.2vw, 1.9rem);
}

.contact-panel p {
  margin: 0.5rem 0 0.9rem;
  color: var(--text-soft);
}

.footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 1.4rem;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.8rem;
}

@keyframes driftA {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(7vw, 5vh);
  }
}

@keyframes driftB {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-8vw, -6vh);
  }
}

@keyframes driftC {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-6vw, -4vh);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 860px) {
  .stack {
    grid-template-columns: 1.04fr 0.96fr;
  }

  .skills-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .nav-actions {
    display: none;
  }
}

@media (max-width: 520px) {
  .portfolio-layout,
  .nav-shell,
  .footer {
    width: calc(100% - 1.1rem);
  }

  .nav-shell {
    padding: 0.74rem 0.82rem;
  }

  .hero h1 {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blob,
  .reveal,
  .reveal.show,
  .btn,
  .meter-fill,
  .status-badge {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .meter-fill {
    width: var(--level);
  }
}
