@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600;700&family=Sora:wght@500;600;700&display=swap");

:root {
  --bg: #050505;
  --bg-accent: rgba(120, 12, 24, 0.22);
  --surface: rgba(10, 10, 10, 0.84);
  --surface-strong: rgba(16, 16, 16, 0.78);
  --text: #f5f5f5;
  --muted: #b7aeb3;
  --line: rgba(255, 74, 98, 0.2);
  --brand: #ff314d;
  --brand-dark: #c1122f;
  --brand-soft: rgba(255, 49, 77, 0.14);
  --sidebar: rgba(7, 7, 7, 0.95);
  --sidebar-line: rgba(255, 74, 98, 0.16);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 49, 77, 0.18),
      transparent 18%
    ),
    radial-gradient(
      circle at 20% 20%,
      rgba(168, 12, 32, 0.12),
      transparent 24%
    ),
    linear-gradient(180deg, #050505 0%, #080808 45%, #030303 100%);
  color: var(--text);
  font-family: "IBM Plex Sans", sans-serif;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 1),
    transparent 88%
  );
}

body::after {
  background:
    radial-gradient(circle at 80% 12%, rgba(255, 49, 77, 0.1), transparent 20%),
    radial-gradient(circle at 18% 78%, rgba(255, 49, 77, 0.08), transparent 24%);
  animation: pulseGlow 10s ease-in-out infinite alternate;
}

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

a {
  color: inherit;
}

.container1 {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  padding: 32px 20px;
  background: linear-gradient(
    180deg,
    rgba(24, 4, 8, 0.94) 0%,
    var(--sidebar) 100%
  );
  border-right: 1px solid var(--sidebar-line);
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.18);
  z-index: 999;
  transition: transform 0.28s ease;
  backdrop-filter: blur(18px);
}

.sidebar nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 52px;
}

.sidebar nav ul li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
  background: linear-gradient(
    90deg,
    rgba(255, 49, 77, 0.18),
    rgba(255, 49, 77, 0.04)
  );
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 49, 77, 0.16);
  transform: translateX(4px);
}

.material-symbols-outlined {
  font-size: 1.15rem;
}

.menu-btn {
  position: fixed;
  top: 18px;
  left: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: rgba(16, 16, 16, 0.92);
  border: 1px solid rgba(255, 49, 77, 0.2);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  color: #fff;
  cursor: pointer;
  z-index: 1001;
}

.menu-btn.active {
  background: rgba(255, 49, 77, 0.18);
  color: #fff;
}

#overlay {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  z-index: 998;
}

#overlay.active {
  display: block;
}

.main {
  width: calc(100% - 250px);
  margin-left: 250px;
  padding: 40px;
}

.hero,
.section-shell {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 36px;
  align-items: center;
}

.hero-copy,
.section-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.hero-copy::before,
.section-shell::before,
.skill-card::before,
.project::before,
.service-card::before,
.contact-card::before,
.contactform::before,
.callout::before,
.highlight::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 80, 103, 0.75),
    transparent
  );
  opacity: 0.85;
}

.hero-copy {
  padding: 44px;
}

.section-shell {
  padding: 42px;
}

.eyebrow {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: #ff7a8d;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-title,
.section-title,
h1,
h2,
h3 {
  font-family: "Sora", sans-serif;
  letter-spacing: -0.02em;
}

.hero-title {
  margin-top: 18px;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  line-height: 1.05;
}

.about {
  margin-top: 18px;
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.45;
}

.moreabout,
.section-lead,
.section-copy,
.contact-note,
.project p,
.service-card p {
  color: var(--muted);
  line-height: 1.7;
}

.moreabout {
  margin-top: 14px;
  max-width: 60ch;
}

.button-group,
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand) 0%, #a90d25 100%);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  background: linear-gradient(135deg, #ff415c 0%, #870919 100%);
  box-shadow: 0 18px 36px rgba(255, 49, 77, 0.25);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 49, 77, 0.04);
  border: 1px solid rgba(255, 49, 77, 0.22);
  color: #ffeef1;
}

.btn-secondary:hover {
  background: rgba(255, 49, 77, 0.12);
  color: #fff;
  box-shadow: 0 14px 28px rgba(255, 49, 77, 0.16);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
}

.social-links a {
  color: #ff7a8d;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  text-decoration: none;
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}

.social-links a:hover {
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 49, 77, 0.5);
}

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

.highlight {
  padding: 18px;
  background: rgba(255, 49, 77, 0.06);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  position: relative;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.highlight:hover,
.skill-card:hover,
.project:hover,
.service-card:hover,
.contact-card:hover,
.contactform:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 74, 98, 0.34);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.highlight span,
.project-meta,
.field-note {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}

.highlight strong {
  font-size: 0.98rem;
  line-height: 1.5;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.devPic img {
  width: min(100%, 360px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 32px;
  border: 1px solid rgba(255, 74, 98, 0.35);
  filter: saturate(0.92) contrast(1.04) brightness(0.92) sepia(0.08)
    hue-rotate(-8deg);
  box-shadow:
    0 0 0 1px rgba(255, 49, 77, 0.08),
    0 18px 42px rgba(255, 49, 77, 0.2),
    0 0 18px rgba(255, 49, 77, 0.14),
    0 24px 50px rgba(0, 0, 0, 0.45);
  animation: portraitFloat 6s ease-in-out infinite;
}

.section-title {
  margin-top: 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
}

.section-lead {
  margin-top: 16px;
  max-width: 72ch;
  font-size: 1.04rem;
}

.section-copy {
  margin-top: 10px;
  max-width: 72ch;
}

.content-block {
  margin-top: 34px;
}

.content-block h2,
.contactform h2,
.contact-card h2 {
  margin-bottom: 18px;
  font-size: 1.3rem;
}

.skill-grid,
.project-grid,
.service-grid {
  display: grid;
  gap: 20px;
}

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

.skill-card,
.project,
.service-card,
.contact-card,
.contactform,
.callout {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(31, 41, 51, 0.08);
  position: relative;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.skill-card {
  padding: 22px;
}

.skill-card h3 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 49, 77, 0.08);
  color: #ffe9ec;
  border: 1px solid rgba(255, 49, 77, 0.16);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
}

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

.project {
  padding: 22px;
}

.project-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.project-heading h3 {
  font-size: 1.08rem;
}

.project-heading a {
  color: #ff7a8d;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

.project-heading a:hover {
  color: #fff;
  transform: translate(2px, -2px);
}

.service-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 28px;
}

.service-card {
  overflow: hidden;
}

.service-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  filter: saturate(0.7) contrast(1.02) brightness(0.72) sepia(0.14)
    hue-rotate(-18deg);
}

.service-body {
  padding: 22px;
}

.service-body h2 {
  margin-bottom: 12px;
}

.service-list {
  margin-top: 16px;
  padding-left: 18px;
  color: var(--text);
}

.service-list li + li {
  margin-top: 10px;
}

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  padding: 24px;
}

.callout p {
  max-width: 52ch;
  color: var(--muted);
  line-height: 1.6;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
  margin-top: 28px;
}

.contact-card,
.contactform {
  padding: 24px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-list a {
  color: #ff8e9f;
  text-decoration: none;
  word-break: break-word;
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}

.contact-list a:hover {
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 49, 77, 0.45);
}

.contact-note {
  margin-top: 18px;
}

.form-field {
  margin-bottom: 18px;
}

.form-field label,
.checkbox-row label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 74, 98, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid rgba(255, 49, 77, 0.18);
  border-color: var(--brand);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.checkbox-row label {
  margin-bottom: 0;
}

.field-note {
  margin-top: 8px;
  margin-bottom: 0;
}

.hero-copy,
.hero-visual,
.section-shell,
.highlight,
.skill-card,
.project,
.service-card,
.contact-card,
.contactform,
.callout {
  opacity: 0;
  transform: translateY(24px);
}

.hero-copy.in-view,
.hero-visual.in-view,
.section-shell.in-view,
.highlight.in-view,
.skill-card.in-view,
.project.in-view,
.service-card.in-view,
.contact-card.in-view,
.contactform.in-view,
.callout.in-view {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.hero-copy.in-view {
  transition-delay: 0.08s;
}

.hero-visual.in-view {
  transition-delay: 0.18s;
}

@keyframes portraitFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulseGlow {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }
  100% {
    opacity: 0.92;
    transform: scale(1.04);
  }
}

@media only screen and (max-width: 1200px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  .sidebar.active {
    transform: translateX(0);
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.18);
  }

  .menu-btn {
    display: inline-flex;
  }

  .main {
    width: 100%;
    margin-left: 0;
    padding: 86px 20px 24px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .section-shell {
    padding: 28px;
  }

  .devPic img {
    width: min(100%, 300px);
  }
}

@media only screen and (max-width: 768px) {
  .sidebar {
    width: min(78vw, 300px);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .about {
    font-size: 1.12rem;
  }

  .hero-highlights,
  .project-grid,
  .service-grid,
  .skill-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .button-group,
  .buttons,
  .callout {
    align-items: stretch;
  }

  .hero-copy,
  .hero-visual,
  .section-shell,
  .highlight,
  .skill-card,
  .project,
  .service-card,
  .contact-card,
  .contactform,
  .callout {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body::after,
  .devPic img {
    animation: none;
  }

  .hero-copy,
  .hero-visual,
  .section-shell,
  .highlight,
  .skill-card,
  .project,
  .service-card,
  .contact-card,
  .contactform,
  .callout {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── PRELOADER ──────────────────────────────────────────── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(
      circle at 70% 20%,
      rgba(255, 49, 77, 0.14),
      transparent 40%
    ),
    radial-gradient(circle at 20% 80%, rgba(168, 12, 32, 0.1), transparent 40%),
    #050505;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

#preloader.pre-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pre-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: min(340px, 88vw);
}

.pre-logo {
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  animation: preLogoPulse 2s ease-in-out infinite;
}

.pre-bracket {
  color: var(--brand);
}

@keyframes preLogoPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.pre-bar-wrap {
  width: 100%;
  height: 3px;
  background: rgba(255, 49, 77, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.pre-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand), #ff6b80);
  box-shadow: 0 0 12px rgba(255, 49, 77, 0.6);
  transition: width 0.18s ease;
}

.pre-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
