:root {
  --bg: #08090a;
  --bg-soft: #0b0d10;
  --text: #ececec;
  --muted: #8e9399;
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.06);
  --panel: rgba(8, 9, 10, 0.64);
  --white-strong: #f5f5f5;
  --highlight: #60a5fa;
}

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

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--muted);
  font-family: "Geist", "Segoe UI", sans-serif;
  background-color: var(--bg);
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  background-attachment: fixed;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #2e3237;
}

::-webkit-scrollbar-thumb:hover {
  background: #4a5058;
}

.site-shell {
  width: min(1400px, 100%);
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: rgba(8, 9, 10, 0.42);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.glass-panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
}

.header-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  min-height: 64px;
}

.header-cell {
  min-height: 64px;
  border-right: 1px solid var(--line);
}

.header-cell:last-child {
  border-right: none;
}

.brand-cell {
  grid-column: span 3;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  color: var(--white-strong);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}

.menu-button {
  display: none;
  background: transparent;
  border: none;
  color: var(--white-strong);
  cursor: pointer;
}

.menu-button svg {
  width: 20px;
  height: 20px;
}

.nav-cell {
  grid-column: span 6;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1.5rem;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white-strong);
}

.contact-cell {
  grid-column: span 3;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.header-email {
  text-decoration: none;
  color: #92979d;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 0.22s ease;
  font-family: "JetBrains Mono", "Consolas", monospace;
}

.header-email:hover {
  color: #cfd3d8;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--highlight);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.7);
  animation: pulse 1.6s infinite;
}

.main-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.left-column {
  grid-column: span 9;
  border-right: 1px solid var(--line);
}

.left-column > section {
  border-bottom: 1px solid var(--line);
}

.hero-section {
  padding: clamp(2rem, 5vw, 6rem);
  position: relative;
}

.hero-corner {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: #50555b;
}

.hero-corner svg {
  width: 24px;
  height: 24px;
}

.hero-content {
  max-width: 820px;
}

.status-pill {
  display: inline-flex;
  margin: 0 0 1.2rem;
  border: 1px solid var(--line);
  color: #969ca2;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  font-family: "JetBrains Mono", "Consolas", monospace;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--white-strong);
  font-weight: 600;
}

.hero-content h1 {
  font-size: clamp(2.1rem, 6vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero-content h2 {
  margin-top: 0.95rem;
  font-size: clamp(1.1rem, 2.4vw, 2rem);
  line-height: 1.35;
  color: #d9dde2;
  letter-spacing: -0.01em;
}

.hero-content h2 span {
  color: #4b4f54;
}

.hero-summary {
  margin-top: 1.3rem;
  font-size: 1rem;
  line-height: 1.85;
  color: #a2a8af;
  max-width: 700px;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  border: 1px solid transparent;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.68rem 1rem;
  transition: all 0.24s ease;
  font-weight: 500;
}

.btn svg {
  width: 14px;
  height: 14px;
}

.btn.solid {
  background: #f5f5f5;
  color: #08090a;
}

.btn.solid:hover {
  background: #dbdde0;
}

.btn.ghost {
  border-color: var(--line);
  color: #c6cad0;
}

.btn.ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--white-strong);
}

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

.project-card {
  padding: clamp(1.5rem, 2.6vw, 2.4rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.25s ease;
}

.project-card:nth-child(2n) {
  border-right: none;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.02);
}

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.8rem;
}

.project-icon {
  border: 1px solid var(--line);
  background: #0b0b0c;
  padding: 0.65rem;
  display: inline-flex;
}

.project-icon svg {
  width: 22px;
  height: 22px;
  color: var(--white-strong);
}

.project-arrow {
  width: 20px;
  height: 20px;
  color: #4e5358;
  transform: rotate(-45deg);
  transition: all 0.3s ease;
}

.project-card:hover .project-arrow {
  transform: rotate(0deg);
  color: #d9dde2;
}

.project-card h3 {
  font-size: 1.08rem;
  line-height: 1.5;
}

.project-card p {
  margin: 0.7rem 0 0;
  line-height: 1.8;
  color: #8f959c;
  font-size: 0.92rem;
}

.project-tags {
  margin-top: 1rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.project-tags span {
  border: 1px solid var(--line);
  color: #9ea4ab;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.24rem 0.4rem;
}

.project-links {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.project-links a {
  text-decoration: none;
  color: #c9ced4;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding-bottom: 0.1rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.project-links a:hover {
  color: #f0f3f7;
  border-color: rgba(255, 255, 255, 0.5);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
}

.about-side {
  border-right: 1px solid var(--line);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: rgba(255, 255, 255, 0.01);
}

.about-side h3 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.avatar-placeholder {
  margin: 1rem 0;
  aspect-ratio: 1 / 1;
  width: 100%;
  border: 1px solid var(--line-soft);
  background: radial-gradient(circle at 24% 16%, rgba(96, 165, 250, 0.24) 0%, rgba(28, 34, 42, 0.8) 42%, #090b0d 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.avatar-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 28%,
    rgba(8, 9, 10, 0) 30%,
    rgba(8, 9, 10, 0.5) 70%,
    rgba(8, 9, 10, 0.82) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.avatar-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
  z-index: 2;
}

.avatar-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
  filter: saturate(0.9) contrast(1.05) brightness(0.94);
  transform: scale(1.04);
  transition: transform 0.65s ease, filter 0.65s ease;
  z-index: 0;
  position: relative;
}

.avatar-placeholder:hover img {
  transform: scale(1.08);
  filter: saturate(0.98) contrast(1.08) brightness(0.97);
}

.meta-list p {
  margin: 0.35rem 0;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 0.7rem;
  color: #777d84;
  letter-spacing: 0.08em;
}

.about-main {
  padding: clamp(1.7rem, 4vw, 3rem);
}

.about-main h3 {
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.about-main p {
  margin: 0 0 0.9rem;
  line-height: 1.8;
  color: #9aa0a7;
  font-size: 0.95rem;
}

.right-column {
  grid-column: span 3;
  background: rgba(0, 0, 0, 0.2);
}

.sticky-panel {
  position: sticky;
  top: 64px;
}

.side-head {
  border-bottom: 1px solid var(--line);
  padding: 1rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.side-head h3 {
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.side-head svg {
  width: 16px;
  height: 16px;
  color: #5f656b;
}

.exp-list {
  display: flex;
  flex-direction: column;
}

.exp-item {
  padding: 1rem;
  border-bottom: 1px solid var(--line-soft);
  transition: background-color 0.24s ease;
}

.exp-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.exp-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.exp-item h4 {
  font-size: 0.84rem;
  color: #d5d9de;
  line-height: 1.5;
}

.exp-item p {
  margin: 0.28rem 0;
  font-size: 0.74rem;
  color: #8f959c;
}

.exp-item span {
  font-size: 0.66rem;
  color: #71777e;
  font-family: "JetBrains Mono", "Consolas", monospace;
  line-height: 1.5;
  display: block;
}

.exp-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--highlight);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.65);
}

.footer-grid {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  position: relative;
}

.footer-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, rgba(128, 128, 128, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(128, 128, 128, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 68%, transparent 100%);
}

.footer-main {
  grid-column: span 9;
  padding: clamp(1.8rem, 4.5vw, 3.5rem);
  position: relative;
  z-index: 1;
}

.footer-main h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  letter-spacing: -0.02em;
}

.footer-main p {
  margin: 0.9rem 0 1.4rem;
  font-size: 1rem;
  line-height: 1.8;
}

.footer-side {
  grid-column: span 3;
  border-left: 1px solid var(--line);
  padding: clamp(1.3rem, 3vw, 2.2rem);
  background: rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 1;
}

.footer-meta p {
  margin: 0 0 0.7rem;
  font-size: 0.74rem;
  color: #92979d;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: "JetBrains Mono", "Consolas", monospace;
  word-break: break-all;
}

.footer-meta svg {
  width: 13px;
  height: 13px;
  color: #676c72;
  flex-shrink: 0;
}

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

.footer-meta a:hover {
  color: var(--white-strong);
}

.copyright {
  margin: 1.3rem 0 0;
  font-size: 0.7rem;
  color: #636970;
  font-family: "JetBrains Mono", "Consolas", monospace;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease var(--delay, 0ms), transform 0.55s ease var(--delay, 0ms);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 0.45;
  }
}

@media (max-width: 1080px) {
  .site-shell {
    border-left: none;
    border-right: none;
  }

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

  .header-cell {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .header-cell:last-child {
    border-bottom: none;
  }

  .brand-cell {
    padding: 0 1rem;
  }

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

  .nav-cell {
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.75rem 1rem;
    gap: 1.1rem;
    justify-content: flex-start;
  }

  .contact-cell {
    display: none;
  }

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

  .left-column {
    border-right: none;
  }

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

  .project-card {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

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

  .about-side {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .right-column {
    border-bottom: 1px solid var(--line);
  }

  .sticky-panel {
    position: static;
  }

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

  .footer-main,
  .footer-side {
    grid-column: auto;
  }

  .footer-side {
    border-left: none;
    border-top: 1px solid var(--line);
  }
}
