:root {
  --bg: #000000;
  --bg-soft: #000000;
  --panel: rgba(24, 24, 24, 0.92);
  --panel-strong: #1a1a1a;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f5f5;
  --muted: #aaaaaa;
  --red: #f03a3a;
  --red-dark: #8d0c0c;
  --red-glow: rgba(240, 58, 58, 0.32);
  --white: #ffffff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --radius-sm: 16px;
  --container: min(1140px, calc(100% - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Outfit", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgb(0, 0, 0), transparent 2%),
    radial-gradient(circle at bottom left, rgb(0, 0, 0), transparent 2%),
    linear-gradient(180deg, #0b0b0b 0%, #000000 100%);
  color: var(--text);
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 20%), rgba(255, 0, 0, 0.08), transparent 18%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.035), transparent 30%);
  z-index: 0;
}

.section {
  position: relative;
  padding: 110px 0;
  z-index: 1;
}

.section-heading {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 54px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.section-heading h2,
.cta-box h2 {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  line-height: 1.12;
}

.heading-dots {
  display: inline-flex;
  gap: 9px;
  margin-top: 22px;
}

.heading-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 18px rgba(240, 58, 58, 0.45);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(5, 5, 5, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  gap: 24px;
}

.logo {
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 700;
}

.logo span {
  color: var(--red);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  position: relative;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  transition: color 0.25s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--red);
  transition: transform 0.28s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--white);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hero {
  min-height: calc(100vh - 88px);
  display: flex;
  align-items: center;
  padding-top: 60px;
}

.hero-grid,
.about-grid,
.resume-layout,
.contact-grid,
.cta-box,
.footer-wrap {
  display: grid;
  gap: 36px;
}

.hero-grid,
.about-grid,
.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
}

.hero-copy h1 {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: 1.03;
}

.typewriter-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 1.2em;
}

#typewriter-text {
  display: inline-block;
}

.typewriter-caret {
  display: inline-block;
  width: 4px;
  height: 0.95em;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 18px rgba(240, 58, 58, 0.55);
  animation: blinkCaret 0.9s step-end infinite;
}

.hero-text {
  margin: 26px 0 0;
  max-width: 630px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--red), #a30404);
  box-shadow: 0 12px 30px rgba(240, 58, 58, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 16px 38px rgba(240, 58, 58, 0.36);
}

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.btn-secondary:hover {
  border-color: rgba(240, 58, 58, 0.65);
  background: rgba(240, 58, 58, 0.08);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 42px;
}

.stat-card,
.contact-card,
.fact-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.stat-card:hover,
.contact-card:hover,
.fact-card:hover {
  transform: translateY(-8px);
  border-color: rgba(240, 58, 58, 0.45);
  background: rgba(240, 58, 58, 0.07);
}

.stat-card strong,
.fact-card strong {
  display: block;
  font-size: 1.7rem;
  color: var(--white);
}

.stat-card span,
.fact-card span,
.contact-card span {
  color: var(--muted);
}

.hero-visual {
  position: relative;
}

.hero-photo-frame,
.image-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(240, 58, 58, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.hero-photo-frame::before,
.image-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: inherit;
  pointer-events: none;
}

.hero-photo-frame img {
  width: 100%;
  aspect-ratio: 0.92;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.05) brightness(0.75);
}

.image-card img {
  width: 100%;
  aspect-ratio: 0.82;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.05) brightness(0.8);
}

.floating-badge {
  position: absolute;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.badge-top {
  top: 20px;
  left: -18px;
}

.badge-bottom {
  right: -12px;
  bottom: 24px;
}

.about-content h3,
.service-card h3,
.blog-card h3,
.timeline-card h3 {
  margin: 0 0 12px;
  font-size: 1.6rem;
}

.about-content p,
.service-card p,
.blog-card p,
.timeline-card p,
.cta-box p {
  color: var(--muted);
  line-height: 1.8;
}

.info-grid,
.service-grid,
.facts-grid,
.blog-grid {
  display: grid;
  gap: 18px;
}

.info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.info-item {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.info-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}

.service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card {
  position: relative;
  padding: 34px 28px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  transform: scaleX(0.35);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: rgba(240, 58, 58, 0.5);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin-bottom: 22px;
  background: rgba(240, 58, 58, 0.14);
  color: var(--red);
  font-weight: 700;
  font-size: 1.15rem;
}

.resume-layout {
  grid-template-columns: 1.3fr 1fr;
  align-items: start;
}

.timeline,
.skill-panel {
  display: grid;
  gap: 20px;
}

.timeline-card,
.skill-panel,
.cta-box,
.contact-form {
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.timeline-year {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--red);
  font-weight: 700;
}

.skill-item + .skill-item {
  margin-top: 20px;
}

.skill-label {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.skill-bar {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.skill-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red-dark), var(--red));
  box-shadow: 0 0 26px rgba(240, 58, 58, 0.35);
}

.facts-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.portfolio-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.filter-btn:hover,
.filter-btn.active {
  transform: translateY(-3px);
  background: linear-gradient(135deg, var(--red), #a40303);
  border-color: rgba(240, 58, 58, 0.65);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.portfolio-card,
.blog-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.35s ease, border-color 0.35s ease, opacity 0.25s ease;
}

.portfolio-card.hide {
  display: none !important;
  opacity: 0.15;
  transform: scale(0.95);
  pointer-events: none;
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.4s ease;
}

.portfolio-overlay {
  position: absolute;
  inset: auto 18px 18px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.82));
  transform: translateY(26px);
  opacity: 0;
  transition: transform 0.32s ease, opacity 0.32s ease;
}

.portfolio-overlay span,
.blog-meta {
  color: var(--red);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portfolio-card:hover,
.blog-card:hover {
  transform: translateY(-10px);
  border-color: rgba(240, 58, 58, 0.52);
}

.portfolio-card:hover img,
.blog-card:hover img {
  transform: scale(1.06);
  filter: brightness(0.72);
}

.portfolio-card:hover .portfolio-overlay {
  transform: translateY(0);
  opacity: 1;
}

.blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.4s ease;
}

.blog-card-content {
  padding: 24px;
}

.cta {
  padding-top: 70px;
  padding-bottom: 70px;
}

.cta-box {
  grid-template-columns: 1.3fr auto;
  align-items: center;
  background:
    radial-gradient(circle at top right, rgba(240, 58, 58, 0.18), transparent 35%),
    rgba(255, 255, 255, 0.035);
}

.contact-cards {
  display: grid;
  gap: 16px;
}

.contact-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.input-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 16px 18px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(240, 58, 58, 0.55);
  box-shadow: 0 0 0 4px rgba(240, 58, 58, 0.12);
  background: rgba(240, 58, 58, 0.04);
}

.site-footer {
  padding: 26px 0 50px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-wrap {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.footer-wrap p {
  margin: 12px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--white);
}

.cursor-dragon {
  position: fixed;
  left: 0;
  top: 0;
  width: 140px;
  height: 82px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 50;
  opacity: 0.88;
  filter: drop-shadow(0 0 16px rgba(255, 0, 0, 0.55));
  transition: opacity 0.25s ease;
}

.dragon-svg {
  width: 100%;
  height: 100%;
}

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .service-grid,
  .portfolio-grid,
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid,
  .about-grid,
  .resume-layout,
  .contact-grid,
  .cta-box,
  .footer-wrap {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy {
    order: 2;
  }

  .hero-visual {
    order: 1;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 88px 20px auto;
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 8, 8, 0.95);
    transform: scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  body.menu-open .site-nav {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }

  .site-nav a {
    padding: 12px 10px;
  }

  .hero-stats,
  .service-grid,
  .portfolio-grid,
  .blog-grid,
  .info-grid,
  .facts-grid,
  .input-row {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 88px 0;
  }

  .cursor-dragon {
    width: 108px;
    height: 64px;
  }
}

@media (max-width: 560px) {
  .hero-copy h1 {
    font-size: 2.4rem;
  }

  .btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .floating-badge {
    display: none;
  }

  .container {
    width: min(100% - 24px, 1140px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@keyframes blinkCaret {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0.18;
  }
}