:root {
  --bg: #07080a;
  --panel: rgba(11, 14, 19, 0.75);
  --panel-strong: #0d1016;
  --text: #ecf2ff;
  --muted: #9ea8bd;
  --accent: #ff2a45;
  --accent-soft: #ff6b6b;
  --line: rgba(236, 242, 255, 0.12);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% -10%, rgba(255, 42, 69, 0.2), transparent 34%),
    radial-gradient(circle at 85% 15%, rgba(46, 110, 255, 0.2), transparent 35%),
    var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: 0 0, 0 0, 24px 24px, 24px 24px;
  mask-image: radial-gradient(circle at center, black 38%, transparent 95%);
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 0;
  position: relative;
  z-index: 20;
}

.topbar-floating {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, -112%);
  width: min(1120px, 92vw);
  padding: 0.95rem 1rem 0.8rem;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 1.05rem 1.05rem;
  background: rgba(10, 13, 19, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  z-index: 40;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.topbar-nav-wrap {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  position: relative;
  z-index: 21;
}

.topbar-floating.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.menu-toggle {
  display: none;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 700;
}

.menu-toggle::before {
  content: "\2630";
}

.topbar.menu-open .menu-toggle::before,
.topbar-floating.menu-open .menu-toggle::before {
  content: "\00D7";
  font-size: 1.7rem;
}

.brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
}

.brand-mark {
  font-family: "Space Grotesk", sans-serif;
  background: linear-gradient(130deg, var(--accent), #ff8f5a);
  color: #fff;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.4rem 0.55rem;
}

.brand-text {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.06em;
  font-weight: 700;
}

nav {
  display: inline-flex;
  gap: 1.2rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover {
  color: var(--text);
}

.hero {
  margin-top: 0.8rem;
  display: block;
}

.hero-fusion {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 1.45rem;
  background: linear-gradient(180deg, rgba(11, 14, 19, 0.96), rgba(8, 10, 14, 0.98));
  backdrop-filter: blur(10px);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-fusion::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 42, 69, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  z-index: 1;
  pointer-events: none;
}

.hero-fusion::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: clamp(9rem, 22vw, 14.5rem);
  height: clamp(8rem, 17vw, 12.5rem);
  background: linear-gradient(180deg, rgba(8, 10, 14, 0), rgba(8, 10, 14, 0.66) 58%, rgba(8, 10, 14, 0.9));
  pointer-events: none;
  z-index: 2;
  opacity: 1;
}

.hero-copy,
.hero-visual {
  border-radius: 0;
}

.hero-copy {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(240px, 0.42fr) minmax(0, 0.58fr);
  gap: 0;
  align-items: stretch;
}

.hero-main {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: clamp(3.8rem, 7vw, 6.5rem) 1.5rem 2.2rem clamp(1rem, 2.8vw, 2rem);
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.2), rgba(8, 10, 14, 0.78) 34%, rgba(8, 10, 14, 0.93));
}

.hero-avatar-wrap {
  position: absolute;
  top: clamp(-6.5rem, -10vw, -4.5rem);
  left: clamp(1rem, 2.8vw, 2rem);
}

.hero-main::before {
  display: none;
}

.hero-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.8rem clamp(1rem, 2.8vw, 2rem) 2rem 1.8rem;
  background:
    linear-gradient(160deg, rgba(12, 15, 23, 0.87), rgba(7, 9, 13, 0.97)),
    rgba(255, 255, 255, 0.01);
  border-left: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(24px) saturate(130%);
}

.hero-avatar {
  width: clamp(100px, 14vw, 145px);
  aspect-ratio: 1;
  height: auto;
  border-radius: 1.25rem;
  border: 3px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 14px 50px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  object-fit: cover;
  display: block;
}

.hero-intro {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
}

.eyebrow {
  font-family: "Space Grotesk", sans-serif;
  color: var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
}

h1,
h2 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
  line-height: 1.1;
}

h1 {
  margin-top: 0;
  font-size: clamp(1.4rem, 2.8vw, 2.55rem);
  max-width: none;
}

.subtitle {
  color: #d8e0f0;
  max-width: 56ch;
  margin: 0.2rem 0 0;
  line-height: 1.7;
}

.hero-about {
  margin: 0;
  max-width: 74ch;
  color: var(--muted);
  line-height: 1.8;
}

.hero-aside-head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero-aside h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.hero-aside h2 i,
.section-head h2 i {
  color: var(--accent-soft);
  font-size: 0.85em;
  line-height: 1;
}

.hero-tags {
  margin-top: 0.15rem;
}

.hero-tags li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
}

.hero-tags i {
  color: var(--accent-soft);
  font-size: 0.8rem;
}

.hero-meta {
  margin-top: 0.1rem;
}

.about-meta-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.about-meta-label i {
  color: var(--accent-soft);
  width: 0.95rem;
  text-align: center;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

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

.btn i {
  font-size: 0.88rem;
}

.btn-primary {
  background: linear-gradient(130deg, var(--accent), #ff8f5a);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 42, 69, 0.25);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.hero-visual {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: 0;
  background: #06080d;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: clamp(6rem, 11vw, 10rem);
  background: linear-gradient(180deg, rgba(6, 8, 13, 0), rgba(6, 8, 13, 1));
  pointer-events: none;
}

.hero-visual img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(1.04) contrast(1.02);
}

.about {
  margin-top: 1.2rem;
}

.about-card {
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  padding: 1.4rem;
  background: var(--panel-strong);
  display: block;
  box-shadow: var(--shadow);
}

.avatar {
  border-radius: 1rem;
  border: 1px solid var(--line);
}

.about p {
  color: var(--muted);
}

.about-lead {
  margin: 0.45rem 0 0;
}

.about-meta {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.about-meta-item {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.87rem;
  color: var(--muted);
}

.about-meta-item > :first-child {
  flex: 0 0 auto;
}

.about-meta-item > :last-child {
  flex: 1 1 auto;
  min-width: 0;
}

.about-meta-label {
  color: #d4ddf0;
  font-weight: 600;
  white-space: nowrap;
}

.about-stack {
  margin-top: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 1.2rem 1.4rem;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.about-stack-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1rem;
  letter-spacing: 0.03em;
}

.about-stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.about-stack-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.about-stack-group-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.about-stack-group .tags {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tags li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  color: #d4ddf0;
}

.projects {
  margin-top: 2.8rem;
  margin-bottom: 2.6rem;
}

.top-projects {
  margin-top: 2.6rem;
}

.top-projects-list {
  display: grid;
  gap: 1rem;
}

.top-project-item {
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
    #0e1218;
  overflow: hidden;
}

.top-project-main {
  display: grid;
  grid-template-columns: 40% 1fr;
  gap: 1.35rem;
  padding: 1rem 1rem 0.2rem;
  align-items: start;
}

.top-project-media {
  display: grid;
  gap: 0.65rem;
  min-height: clamp(300px, 36vw, 430px);
}

.top-project-media.has-gallery {
  grid-template-rows: minmax(0, 7fr) minmax(82px, 3fr);
}

.top-project-media.no-gallery {
  grid-template-rows: 1fr;
}

.top-project-hero {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  background: #000;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.top-project-hero.tall-aspect {
  aspect-ratio: auto;
  max-height: 280px;
  object-fit: contain;
}

.top-project-hero:hover {
  opacity: 0.9;
  border-color: rgba(255, 107, 107, 0.7);
}

.top-project-content {
  padding: 0.2rem 0.25rem 0.9rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-period {
  margin: 0;
  color: var(--accent-soft);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Space Grotesk", sans-serif;
}

.top-project-content h3 {
  margin: 0.25rem 0 0.35rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
}

.top-project-technologies {
  display: grid;
  gap: 0.45rem;
  margin: -0.1rem 0 0.15rem;
}

.top-project-technologies strong {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
  font-family: "Space Grotesk", sans-serif;
}

.top-project-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.top-project-tech-chip {
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #dce4f5;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 0.24rem 0.62rem;
}

.top-project-content p {
  color: var(--muted);
  margin: 0;
  line-height: 1.72;
}

.private-note {
  margin: 0.1rem 0 0.1rem;
  color: #c8d4eb;
  font-size: 0.9rem;
}

.company-info {
  margin: 0.1rem 0 0.1rem;
  color: #c8d4eb;
  font-size: 0.9rem;
}

.company-info a {
  color: var(--accent-soft);
  text-decoration: none;
  font-weight: 500;
}

.company-info a:hover {
  text-decoration: underline;
}

.top-project-description strong {
  color: #f2f6ff;
  font-weight: 600;
}

.top-project-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  height: 100%;
  padding: 0.05rem;
  overflow: hidden;
}

.top-project-gallery-slot {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: #000;
  overflow: hidden;
}

.top-project-gallery-slot.is-empty {
  opacity: 0.32;
}

.top-project-gallery::-webkit-scrollbar {
  height: 6px;
}

.top-project-gallery::-webkit-scrollbar-track {
  background: transparent;
}

.top-project-gallery::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}

.top-project-gallery-item {
  width: 100%;
  height: 100%;
  min-height: 82px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: opacity 0.2s ease, filter 0.2s ease;
  flex-shrink: 0;
}

.top-project-gallery-item:hover {
  opacity: 0.94;
  filter: saturate(1.08) brightness(1.05);
}

.section-head p {
  margin: 0.55rem 0 1rem;
  color: var(--muted);
}

.section-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

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

.project-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
    #0e1218;
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  display: grid;
  grid-template-rows: 170px auto;
  min-height: 100%;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 42, 69, 0.55);
}

.project-thumb {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  background: #111;
}

.project-content {
  padding: 0.9rem;
}

.project-content h3 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0 0 0.4rem;
}

.project-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.project-meta {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.chip {
  font-size: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.56rem;
  color: #c8d4eb;
}

.project-link {
  margin-top: 0.95rem;
  display: inline-flex;
  font-size: 0.9rem;
  text-decoration: none;
  color: #fff;
}

.project-link:hover {
  color: var(--accent-soft);
}

.contact {
  margin-top: 2.8rem;
  margin-bottom: 2.8rem;
}

.contact-form {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  display: grid;
  gap: 0.55rem;
}

.contact-form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d7dff0;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  padding: 0.72rem 0.85rem;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(255, 107, 107, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 42, 69, 0.12);
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

.contact-honey {
  position: absolute;
  left: -10000px;
  opacity: 0;
  pointer-events: none;
}

.contact-form .btn {
  justify-self: start;
  margin-top: 0.3rem;
}

.contact-status {
  margin: 0.25rem 0 0;
  padding: 0.58rem 0.72rem;
  border-radius: 0.72rem;
  border: 1px solid transparent;
  font-size: 0.88rem;
  line-height: 1.4;
}

.contact-status.success {
  color: #d8ffe7;
  border-color: rgba(75, 204, 124, 0.45);
  background: rgba(75, 204, 124, 0.14);
}

.contact-status.error {
  color: #ffd2d2;
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 42, 69, 0.14);
}

.footer {
  padding-bottom: 2.2rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  color: var(--muted);
}

.footer a {
  color: #d5ddf4;
  text-decoration: none;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 3rem);
  max-height: calc(100vh - 4rem);
}

.lightbox-content img {
  max-width: 100%;
  max-height: min(84vh, calc(100vh - 5rem));
  object-fit: contain;
  border-radius: 0.4rem;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-content img.tall-aspect {
  max-height: min(78vh, calc(100vh - 5.5rem));
  width: auto;
}

.lightbox-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  background: rgba(7, 9, 13, 0.82);
  border: 1px solid rgba(236, 242, 255, 0.22);
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  z-index: 2;
}

.lightbox-close:hover {
  background: rgba(13, 17, 24, 0.9);
  border-color: rgba(255, 107, 107, 0.45);
  color: var(--accent-soft);
}

@media (max-width: 640px) {
  .lightbox-close {
    top: 0.45rem;
    right: 0.45rem;
    width: 2.65rem;
    height: 2.65rem;
    font-size: 1.7rem;
  }
}

@media (max-width: 980px) {
  .hero-fusion::before {
    background:
      radial-gradient(circle at 18% 18%, rgba(255, 42, 69, 0.16), transparent 28%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  }

  .hero-fusion::after {
    top: clamp(8.8rem, 23vw, 14rem);
    height: clamp(8rem, 22vw, 12rem);
  }

  .hero-copy {
    grid-template-columns: minmax(200px, 0.4fr) minmax(0, 0.6fr);
  }

  .hero-main {
    padding: clamp(3.2rem, 6vw, 5.5rem) 1.2rem 2rem 1rem;
  }

  .hero-avatar-wrap {
    top: clamp(-5.5rem, -9vw, -4rem);
    left: 1rem;
  }

  .hero-aside {
    padding: 1.5rem 1rem 1.8rem 1.4rem;
  }

  .hero-about {
    max-width: none;
  }

  .hero-tags {
    margin-top: 0;
  }

  .top-project-main {
    grid-template-columns: 1fr;
    gap: 0.95rem;
    padding: 0.9rem 0.9rem 0.8rem;
  }

  .top-project-media {
    min-height: 290px;
  }

  .top-project-hero {
    min-height: 220px;
    border-right: 1px solid var(--line);
  }

  .top-project-content {
    padding: 0.15rem 0.15rem 0.1rem;
  }

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

@media (max-width: 900px) {
  .topbar {
    align-items: center;
  }

  .topbar-floating {
    align-items: center;
  }

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

  .topbar-nav-wrap {
    margin-left: auto;
    align-items: center;
  }

  .topbar-floating {
    top: 0;
    padding: 0.72rem 0.72rem 0.62rem;
    border-radius: 0 0 0.95rem 0.95rem;
  }

  .topbar-floating .brand-text {
    font-size: 0.85rem;
  }

  .topbar nav,
  .topbar-floating nav {
    position: absolute;
    top: calc(100% + 0.65rem);
    right: 0.3rem;
    display: none;
    min-width: min(18rem, calc(100vw - 2.6rem));
    padding: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(10, 13, 19, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    z-index: 5;
  }

  .topbar.menu-open nav,
  .topbar-floating.menu-open nav {
    display: flex;
  }

  .topbar nav a,
  .topbar-floating nav a {
    display: block;
    font-size: 0.95rem;
    line-height: 1.35;
    padding: 0.6rem 0.78rem;
    border-radius: 0.78rem;
  }
}

@media (max-width: 640px) {
  nav a {
    font-size: 0.92rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.8rem;
  }

  .topbar nav a:hover,
  .topbar-floating nav a:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .hero-fusion::before {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  }

  .hero-fusion::after {
    top: 0;
    height: 100%;
    background: linear-gradient(
      180deg,
      rgba(8, 10, 14, 0.26) 0%,
      rgba(8, 10, 14, 0.5) 62%,
      rgba(8, 10, 14, 0.86) 100%
    );
  }

  .hero-copy {
    grid-template-columns: 1fr;
  }

  .hero-main {
    padding: clamp(3rem, 18vw, 5rem) 0.9rem 1.5rem 0.9rem;
  }

  .hero-avatar-wrap {
    top: clamp(-5rem, -20vw, -3rem);
    left: 0.9rem;
  }

  .hero-avatar {
    width: clamp(85px, 22vw, 120px);
  }

  .hero-cta {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .hero-cta .btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.58rem 0.7rem;
    font-size: 0.88rem;
    gap: 0.4rem;
    white-space: nowrap;
  }

  .hero-cta .btn i {
    font-size: 0.78rem;
  }

  .hero-aside {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    padding: 1.5rem 0.9rem;
  }

  .eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  h1 {
    font-size: clamp(1.85rem, 10vw, 2.55rem);
    max-width: none;
  }

  .subtitle {
    max-width: none;
    margin: 0.1rem 0 0;
    font-size: 0.96rem;
  }

  .hero-about {
    font-size: 0.95rem;
    line-height: 1.72;
  }

  .hero-tags li {
    font-size: 0.78rem;
  }

  .hero-visual {
    min-height: clamp(12rem, 53vw, 16.8rem);
  }

  .hero-visual img {
    width: 100%;
    height: clamp(12rem, 53vw, 16.8rem);
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center 24%;
  }

  .about-card {
    padding: 1.2rem 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .top-project-gallery-item {
    min-height: 74px;
  }

  .top-project-gallery-slot {
    min-height: 74px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
