:root {
  --bg: #070b12;
  --panel: #0d1422;
  --panel-2: #111c2e;
  --text: #eef4ff;
  --muted: #97a7bd;
  --line: rgba(160, 180, 210, 0.18);
  --accent: #38d5ff;
  --accent-2: #7c5cff;
  --success: #38e8a6;
  --danger: #ff6b6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --sans: "Inter", Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  background:
    radial-gradient(
      circle at 20% 0%,
      rgba(56, 213, 255, 0.18),
      transparent 32rem
    ),
    radial-gradient(
      circle at 86% 18%,
      rgba(124, 92, 255, 0.14),
      transparent 30rem
    ),
    linear-gradient(180deg, #070b12 0%, #08101c 42%, #070b12 100%);
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  place-items: center;
  background: #05080e;
  transition:
    opacity 500ms ease,
    visibility 500ms ease;
}

.page-loader span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-loader.hide-loader {
  opacity: 0;
  visibility: hidden;
}

.availability-banner {
  position: fixed;
  top: 3px;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 10px 18px;
  background: linear-gradient(90deg, var(--accent), #bff5ff);
  color: #06111d;
  font-size: 0.88rem;
  font-weight: 800;
}

.availability-banner p {
  margin: 0;
}

.availability-banner div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.availability-banner a {
  font-family: var(--mono);
  text-decoration: underline;
}

.availability-banner button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(6, 17, 29, 0.12);
  color: #06111d;
  font-weight: 900;
}

.site-header {
  position: fixed;
  top: 49px;
  left: 0;
  right: 0;
  z-index: 70;
  transition:
    top 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.site-header.banner-hidden {
  top: 3px;
}

.site-header.scrolled {
  background: rgba(7, 11, 18, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo-text {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease;
}

.nav-links a:hover,
.nav-links a.active-link {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
}

.hero-section {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 190px 0 90px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  gap: 56px;
  align-items: center;
}

.section-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.86;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h2 {
  max-width: 740px;
  margin: 28px 0 0;
  color: #d9e8fa;
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  line-height: 1.18;
}

#typewriterText {
  color: var(--accent);
}

.hero-copy p:not(.section-kicker) {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-actions,
.contact-actions,
.project-links,
.hero-meta,
.tag-list,
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 32px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.primary-btn {
  border: 0;
  background: linear-gradient(135deg, var(--accent), #bff5ff);
  color: #06111d;
}

.secondary-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-2px);
}

.secondary-btn:hover {
  border-color: rgba(56, 213, 255, 0.55);
  color: var(--accent);
}

.hero-meta {
  margin-top: 22px;
}

.hero-meta span,
.tag-list span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #c8d7ea;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.hero-visual {
  position: relative;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  height: min(540px, 68vh);
  object-fit: cover;
  display: block;
  border-radius: 6px;
  filter: grayscale(28%);
}

.status-card {
  position: absolute;
  right: -18px;
  bottom: 26px;
  width: min(260px, calc(100% - 24px));
  padding: 16px;
  background: rgba(13, 20, 34, 0.94);
  border: 1px solid rgba(56, 213, 255, 0.34);
  border-radius: 8px;
  backdrop-filter: blur(14px);
}

.status-card strong,
.status-card span {
  display: block;
}

.status-card strong {
  margin-bottom: 6px;
  color: var(--accent);
}

.status-card span {
  color: var(--muted);
  line-height: 1.55;
}

.about-section,
.projects-section,
.skills-section,
.contact-section {
  padding: 110px 0;
  border-top: 1px solid var(--line);
}

.split-layout {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 54px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 42px;
}

.section-title {
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: 0;
}

.content-stack p,
.contact-text {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

.content-stack p:first-child {
  margin-top: 0;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.stats-row article,
.skills-grid article,
.contact-form,
.project-card {
  background: rgba(13, 20, 34, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats-row article {
  padding: 18px;
}

.stats-row strong {
  display: block;
  color: var(--accent);
  font-size: 2.15rem;
  font-weight: 900;
}

.stats-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.filter-buttons {
  margin-bottom: 28px;
}

.filter-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
}

.filter-btn:hover,
.filter-btn.active-filter {
  background: var(--accent);
  border-color: var(--accent);
  color: #06111d;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  overflow: hidden;
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 213, 255, 0.46);
}

.project-card.is-hidden {
  display: none;
}

.project-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  background: var(--panel-2);
}

.project-card > div {
  padding: 24px;
}

.project-number {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 800;
}

.project-card h3,
.skills-grid h3 {
  margin: 10px 0 12px;
  font-size: 1.45rem;
}

.project-card p,
.skills-grid p {
  color: var(--muted);
  line-height: 1.75;
}

.project-links {
  margin-top: 22px;
}

.project-links a,
.portfolio-footer a,
.contact-email {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.skills-grid article {
  padding: 22px;
}

.skills-grid h3 {
  color: var(--accent);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

.contact-text {
  max-width: 620px;
}

.contact-actions {
  align-items: center;
  margin-top: 28px;
}

.contact-email {
  font-size: clamp(1.2rem, 3vw, 2rem);
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: #dbe9fb;
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 11, 18, 0.78);
  color: var(--text);
  outline: none;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(56, 213, 255, 0.65);
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.86rem;
}

.form-message.error {
  color: var(--danger);
}

.portfolio-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}

.footer-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-layout p {
  margin: 0;
  color: var(--muted);
}

.reveal-section {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 650ms ease,
    transform 650ms ease;
}

.reveal-section.show-section {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    position: fixed;
    top: 122px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    background: rgba(13, 20, 34, 0.98);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .site-header.banner-hidden .nav-links {
    top: 76px;
  }

  .nav-links.show {
    display: flex;
  }

  .hero-grid,
  .split-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero-section {
    padding-top: 160px;
  }

  .hero-visual {
    max-width: 520px;
  }

  .project-grid,
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .availability-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .site-header {
    top: 91px;
  }

  .nav-links {
    top: 162px;
  }

  .hero-section {
    padding-top: 220px;
  }

  .hero-copy h1 {
    font-size: clamp(3.4rem, 18vw, 5.2rem);
  }

  .project-grid,
  .skills-grid,
  .stats-row {
    grid-template-columns: 1fr;
  }

  .about-section,
  .projects-section,
  .skills-section,
  .contact-section {
    padding: 82px 0;
  }

  .status-card {
    position: static;
    width: auto;
    margin-top: 12px;
  }

  .project-card img {
    height: 220px;
  }
}

@media (max-width: 480px) {
  .container,
  .nav-shell {
    width: min(100% - 24px, 1120px);
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }
}
