@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Orbitron:wght@500;700;900&display=swap");

/* Design tokens and global reset */
:root {
  --page-bg: #000000;
  --surface: #050505;
  --surface-raised: #101018;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.78);
  --pink-neon: #ff2bd6;
  --cyan: #75bddd;
  --focus: #75bddd;
  --border: rgba(255, 255, 255, 0.16);
  --shadow-pink: 0 0 18px rgba(255, 43, 214, 0.42);
  --shadow-strong: 0 0 28px rgba(255, 43, 214, 0.58);
  --footer-offset: 96px;
}

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

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--page-bg) !important;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

img,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--cyan);
}

a:hover {
  color: var(--pink-neon);
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-nav a,
.custom-cta,
.more-btn,
.motion-toggle {
  font-family: "Orbitron", "Inter", sans-serif;
  letter-spacing: 0;
}

main {
  position: relative;
  z-index: 1;
  width: 100%;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.text-pink {
  color: var(--pink-neon) !important;
}

.text-highlight {
  color: var(--pink-neon);
  font-weight: 700;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  transform: translateY(-160%);
  padding: 0.65rem 0.9rem;
  border-radius: 0.35rem;
  background: #ffffff;
  color: #000000 !important;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.noscript-alert {
  position: relative;
  z-index: 2000;
  margin: 0;
  padding: 0.85rem 1rem;
  background: var(--cyan);
  color: #000000 !important;
  font-weight: 800;
  text-align: center;
}

/* Shared navigation, footer, and controls */
.site-header,
.navbar,
footer {
  position: relative;
  z-index: 1030;
}

.navbar {
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  background-color: #000000 !important;
  box-shadow: var(--shadow-pink);
}

.navbar > .container,
.navbar > .container-fluid {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: clamp(1rem, 4vw, 2rem) !important;
  padding-right: clamp(1rem, 4vw, 2rem) !important;
}

.navbar-brand-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  color: var(--pink-neon) !important;
  font-size: 1.5rem;
  line-height: 1;
  text-shadow: 0 0 10px var(--pink-neon);
  box-shadow: var(--shadow-pink);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.navbar-brand-glow:hover,
.navbar-brand-glow:focus-visible {
  color: var(--pink-neon) !important;
  box-shadow: var(--shadow-strong);
  transform: translateY(-1px);
}

.navbar .navbar-nav {
  width: 100%;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 2.25rem) !important;
}

.nav-link {
  display: inline-block !important;
  color: #ffffff !important;
  border-radius: 0.5rem;
  font-weight: 700;
  transition: background-color 180ms ease, color 180ms ease, text-shadow 180ms ease;
}

.nav-link:hover,
.nav-link.active,
.nav-link:focus-visible {
  color: var(--pink-neon) !important;
  background: rgba(255, 43, 214, 0.12);
  text-shadow: 0 0 10px var(--pink-neon);
}

footer {
  width: 100%;
  background-color: #000000 !important;
  box-shadow: var(--shadow-pink);
}

footer p {
  color: var(--text-muted);
}

footer a {
  color: var(--pink-neon) !important;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease, text-shadow 180ms ease;
}

footer a:hover,
footer a:focus-visible {
  color: #ffffff !important;
  transform: translateY(-2px);
  text-shadow: 0 0 14px var(--pink-neon);
}

.custom-cta,
.more-btn {
  border: 1px solid var(--pink-neon);
  border-radius: 0.5rem;
  background: #000000;
  color: var(--pink-neon);
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.custom-cta:hover,
.custom-cta:focus-visible,
.more-btn:hover,
.more-btn:focus-visible {
  background: var(--pink-neon);
  color: #000000 !important;
  box-shadow: var(--shadow-strong);
  transform: translateY(-1px);
}

.primary-btn {
  display: inline-flex;
  justify-content: center;
  min-width: 12rem;
}

.card {
  background: #000000 !important;
  color: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 0 12px rgba(255, 43, 214, 0.22);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.card:hover,
.card:focus-within {
  border-color: var(--pink-neon);
  box-shadow: var(--shadow-strong);
}

/* Homepage hero and motion control */
.main-bg-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000000;
}

.main-bg-video .bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120vw;
  height: 67.5vw;
  min-width: 100vw;
  min-height: 100vh;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.5;
  filter: brightness(0.7) saturate(0.85) contrast(0.95);
  pointer-events: none;
}

.hero-overlay {
  background:
    radial-gradient(circle at 50% 64%, rgba(255, 43, 214, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.86));
}

.motion-toggle {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--footer-offset) + 1rem);
  z-index: 1028;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--pink-neon);
  border-radius: 0.4rem;
  background: #000000;
  color: #ffffff;
  box-shadow: var(--shadow-pink);
}

.motion-toggle:hover,
.motion-toggle:focus-visible {
  background: var(--pink-neon);
  color: #000000;
}

.profile-info {
  max-width: min(100%, 52rem);
}

.typewriter-bg {
  display: inline-block;
  width: min(100%, 48rem);
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.88);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.65);
}

.typewriter-bg .hero-title,
.typewriter-bg .hero-subtitle,
.typewriter-bg .terminal-prompt {
  margin: 0;
}

.terminal-prompt {
  min-height: 1.45rem;
  color: var(--pink-neon);
}

.hero-title {
  color: var(--pink-neon);
  font-size: clamp(2.1rem, 9vw, 4.8rem) !important;
  line-height: 0.98;
  text-shadow: 3px 3px 14px rgba(0, 0, 0, 0.95);
  white-space: nowrap;
}

.hero-subtitle {
  min-height: 2.1rem;
  color: var(--cyan) !important;
  font-size: clamp(1rem, 5vw, 2.8rem) !important;
  line-height: 1.15;
  text-shadow: 3px 3px 14px rgba(0, 0, 0, 0.95);
}

/* About and resume sections */
.resume-shell {
  max-width: 1180px;
}

.about-me-row {
  align-items: stretch;
}

.about-me-column {
  display: flex;
}

.about-me-column > .card {
  width: 100%;
}

.resume-photo {
  width: min(100%, 520px);
  height: auto;
  border: 3px solid var(--pink-neon);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), var(--shadow-pink);
}

.resume-summary p {
  max-width: 48rem;
}

.about-me-bio-body {
  padding: clamp(1.25rem, 4vw, 2.25rem);
  text-align: left;
}

.profile-typing {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 4rem;
  margin-bottom: 1rem;
  font-family: "Orbitron", "Inter", sans-serif;
}

.typing-lines {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.typing-line {
  line-height: 1.2;
}

.typing-line-name {
  color: var(--pink-neon);
  font-size: clamp(1.5rem, 4vw, 2rem);
  text-shadow: 0 0 12px rgba(255, 43, 214, 0.55);
}

.typing-line-role {
  color: var(--cyan);
  font-size: clamp(1rem, 3vw, 1.25rem);
  text-shadow: 0 0 10px rgba(117, 189, 221, 0.5);
}

.typing-cursor {
  display: inline-block;
  margin-left: 0.15rem;
  color: var(--cyan);
  animation: blink-cursor 1s steps(1) infinite;
}

@keyframes blink-cursor {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

.about-me-text {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 400 !important;
  line-height: 1.7;
}

.resume-section .card-body,
.resume-section .card-body li,
.resume-section .card-body p,
.resume-section .card-body table {
  font-size: 1rem;
}

.tech-skill-grid-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.tech-skill-cell {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: #000000;
  text-align: center;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tech-skill-cell:hover,
.tech-skill-cell:focus-within {
  border-color: var(--pink-neon);
  box-shadow: var(--shadow-strong);
  transform: translateY(-2px);
}

.tech-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(224, 110, 152, 0.45));
}

.tech-skill-name {
  display: block;
  line-height: 1.2;
}

.qualification-list {
  margin: 0;
  padding-left: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  list-style: disc outside;
}

.qualification-list li {
  margin-bottom: 0.65rem;
}

.qualification-list li::marker {
  color: var(--pink-neon);
}

.qualification-list li:last-child {
  margin-bottom: 0;
}

.resume-download-btn:hover,
.resume-download-btn:focus-visible {
  background-color: var(--pink-neon);
  border-color: var(--pink-neon);
  color: #000000;
  box-shadow: var(--shadow-strong);
}

/* Projects grid and case-study dialog */
.projects-page-main {
  width: 100%;
}

.projects-intro {
  width: min(100% - 2rem, 920px);
  margin: 0 auto;
  padding: 3rem 0 0.5rem;
  text-align: center;
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.projects-intro h1 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
}

.projects-intro p {
  max-width: 48rem;
  margin: 0 auto;
  color: var(--text-muted);
  line-height: 1.7;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 2.5rem;
  background-color: #000000;
}

.project-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: clamp(1rem, 2vw, 1.5rem);
}

.project-card p {
  color: var(--text-muted);
  line-height: 1.6;
}

.project-card .more-btn {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.55rem 1rem;
}

.card-image-container {
  position: relative;
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 9;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #000000;
}

.card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-avatar {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.expanded-card {
  position: relative;
  display: flex;
  width: min(100%, 900px);
  max-height: calc(100vh - 2rem);
  flex-direction: column;
  align-items: flex-start;
  overflow-y: auto;
  padding: clamp(1rem, 4vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface) !important;
  color: #ffffff !important;
  box-shadow: var(--shadow-strong);
  transform: scale(0.98);
  transition: transform 220ms ease;
}

.overlay.active .expanded-card {
  transform: scale(1);
}

.close-btn {
  position: sticky;
  top: 0;
  align-self: flex-end;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border) !important;
  border-radius: 999px;
  background: #000000 !important;
  color: #ffffff !important;
  font-size: 1.7rem;
  line-height: 1;
}

.case-study-list {
  display: grid;
  gap: 0.85rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.case-study-list li {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.6;
}

.case-study-list strong {
  color: var(--cyan);
}

body.modal-open {
  overflow: hidden;
}

/* Contact form and validation feedback */
.contact-page {
  position: relative;
  overflow-x: hidden;
}

.contact-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.82)),
    url("../images/profile-background.jpg") center / cover no-repeat;
  pointer-events: none;
}

.contact-page-main {
  padding-top: 3rem;
  padding-bottom: 7rem;
}

.contact-page-content {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.78);
  box-shadow: var(--shadow-pink);
}

.contact-page-content .lead {
  color: var(--text-muted) !important;
}

#contactForm {
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.72);
}

.contact-page .form-control {
  color: #ffffff !important;
}

.contact-page .form-control::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.success-message {
  margin-top: 2rem;
  margin-bottom: 2.5rem;
  scroll-margin-block: 7rem;
}

.success-message[hidden] {
  display: none !important;
}

/* Responsive layout adjustments */
@media (max-width: 991.98px) {
  :root {
    --footer-offset: 132px;
  }

  .navbar .navbar-collapse {
    padding: 0.75rem 0 0.25rem;
  }

  .navbar-nav {
    align-items: stretch !important;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    text-align: center;
  }

  .grid-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1.5rem;
  }

  .resume-photo {
    width: min(100%, 420px);
  }
}

@media (max-width: 767.98px) {
  :root {
    --footer-offset: 156px;
  }

  footer .container {
    text-align: center;
  }

  .main-bg-video .bg-video {
    width: 190vw;
    opacity: 0.42;
  }

  .hero-title {
    white-space: normal;
  }

  .grid-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .card-image-container {
    aspect-ratio: 16 / 10;
  }

  .tech-skill-grid-list {
    grid-template-columns: 1fr;
  }

  .contact-page-main {
    padding-top: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .typewriter-bg {
    padding: 0.65rem 0.75rem;
  }

  .primary-btn {
    width: min(100%, 16rem);
  }

  .projects-intro {
    padding-top: 2rem;
  }

  .project-card {
    padding: 1rem;
  }

  .motion-toggle {
    right: 0.75rem;
    bottom: calc(var(--footer-offset) + 0.75rem);
  }
}

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

  .typing-cursor {
    animation: none;
  }

  .main-bg-video .bg-video {
    opacity: 0.34;
  }
}
