:root {
  --bg: #060b10;
  --bg-2: #09121a;
  --panel: #0d1821;
  --panel-2: #111f2b;
  --line: #173846;
  --line-soft: #102a35;
  --text: #d8f2eb;
  --muted: #7ca39a;
  --accent: #3aff9a;
  --accent-2: #42d6ff;
  --chip: #0b141b;
  --shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
}

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

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

body {
  font-family: "JetBrains Mono", "IBM Plex Mono", monospace;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% -10%, rgba(58, 255, 154, 0.12), transparent 36%),
    radial-gradient(circle at -12% 90%, rgba(66, 214, 255, 0.1), transparent 40%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(123, 255, 213, 0.03) 0,
    rgba(123, 255, 213, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.22;
  z-index: -3;
}

body.is-lang-transition [data-i18n],
body.is-lang-transition [data-i18n-html] {
  animation: i18n-swap 220ms ease;
}

@keyframes i18n-swap {
  0% {
    opacity: 0.2;
    transform: translateY(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: radial-gradient(rgba(196, 255, 242, 0.7) 0.4px, transparent 0.4px);
  background-size: 4px 4px;
  mix-blend-mode: screen;
  z-index: -2;
}

.orb {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(52px);
  z-index: -1;
}

.orb-a {
  width: 260px;
  height: 260px;
  right: -70px;
  top: 60px;
  background: rgba(58, 255, 154, 0.16);
}

.orb-b {
  width: 260px;
  height: 260px;
  left: -80px;
  bottom: 70px;
  background: rgba(66, 214, 255, 0.12);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: min(1100px, calc(100% - 1.4rem));
  margin: 0.7rem auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.62rem 0.86rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(12, 23, 32, 0.92), rgba(8, 16, 22, 0.95));
  box-shadow: 0 0 0 1px rgba(58, 255, 154, 0.08), var(--shadow);
  backdrop-filter: blur(10px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.56rem;
  min-width: 0;
}

.header-avatar-link {
  display: inline-flex;
  text-decoration: none;
}

.header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(58, 255, 154, 0.14);
  object-fit: cover;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.36rem;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.24rem 0.48rem;
  font-size: 0.76rem;
  text-transform: lowercase;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

nav a::before {
  content: "~/";
  color: rgba(66, 214, 255, 0.55);
}

nav a:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(66, 214, 255, 0.08);
}

.header-center {
  justify-self: center;
}

.terminal-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.62rem;
  color: var(--accent-2);
  font-size: 0.66rem;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  background: rgba(8, 15, 21, 0.84);
}

.cursor {
  width: 7px;
  height: 0.9em;
  background: var(--accent);
  display: inline-block;
  box-shadow: 0 0 8px rgba(58, 255, 154, 0.55);
  animation: blink-cursor 1s steps(2, start) infinite;
}

.lang-switcher {
  display: flex;
  gap: 0.35rem;
}

.lang-switcher button {
  border: 1px solid var(--line);
  background: rgba(7, 14, 19, 0.9);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.68rem;
  padding: 0.18rem 0.44rem;
  border-radius: 6px;
  cursor: pointer;
}

.lang-switcher button.active {
  color: #03140c;
  border-color: transparent;
  background: linear-gradient(130deg, var(--accent), #6fffbb);
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.35rem 1rem 3.8rem;
}

.hero {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.3rem;
  background:
    linear-gradient(90deg, rgba(58, 255, 154, 0.06), transparent 24%),
    linear-gradient(180deg, rgba(12, 26, 36, 0.92), rgba(8, 18, 24, 0.92));
  box-shadow: var(--shadow);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.16fr minmax(170px, 250px);
  gap: 1rem;
  align-items: end;
}

.kicker,
.eyebrow {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.kicker::before,
.eyebrow::before {
  content: "// ";
  color: var(--accent);
}

h1 {
  margin: 0.62rem 0 0;
  max-width: 16ch;
  line-height: 0.9;
  font-size: clamp(1.8rem, 6.2vw, 4.5rem);
  font-family: "Space Mono", "JetBrains Mono", monospace;
  text-transform: uppercase;
}

h1 span {
  display: block;
}

.hero-name {
  color: var(--accent);
  text-shadow: 0 0 16px rgba(58, 255, 154, 0.32);
}

.lead {
  margin: 0.9rem 0 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 0.86rem;
}

.hero-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.46rem 0.68rem;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

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

.btn-primary {
  color: #05120d;
  border-color: transparent;
  background: linear-gradient(130deg, #30ff93, #68ffc5);
  box-shadow: 0 8px 18px rgba(58, 255, 154, 0.24);
}

.btn-secondary {
  color: var(--text);
  background: rgba(10, 18, 24, 0.84);
}

.hero-side {
  display: grid;
  gap: 0.55rem;
  justify-items: end;
}

.profile-pic {
  width: clamp(130px, 21vw, 178px);
  height: clamp(130px, 21vw, 178px);
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(58, 255, 154, 0.16), 12px 12px 0 rgba(13, 30, 40, 0.75);
  filter: saturate(0.88) contrast(1.08);
}

.hero-side-note {
  margin: 0;
  max-width: 24ch;
  text-align: right;
  color: var(--muted);
  font-size: 0.69rem;
}

.section {
  margin-top: 2.8rem;
}

.section-head h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.12rem, 3.2vw, 1.85rem);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: "Space Mono", "JetBrains Mono", monospace;
}

.big-projects {
  margin-top: 0.86rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.7rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem;
  background:
    linear-gradient(180deg, rgba(17, 34, 45, 0.78), rgba(10, 19, 26, 0.82));
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.54;
}

.card:hover {
  border-color: #245a6d;
  box-shadow: 0 12px 24px rgba(2, 11, 16, 0.6);
}

.card h3 {
  margin: 0;
  font-size: 0.91rem;
  color: #e9fff8;
}

.card p {
  margin: 0.54rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.project-links {
  margin-top: 0.76rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.project-links a,
.btn-link {
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--chip);
  border-radius: 6px;
  padding: 0.22rem 0.52rem;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-link {
  cursor: pointer;
  font-family: inherit;
}

.project-links a:hover,
.btn-link:hover {
  border-color: #255a64;
  background: rgba(66, 214, 255, 0.1);
}

.small-project-list {
  margin-top: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(10, 18, 25, 0.82);
}

.small-project {
  padding: 0.78rem 0.88rem;
  border-bottom: 1px dashed var(--line-soft);
}

.small-project:last-child {
  border-bottom: 0;
}

.small-project h3 {
  margin: 0;
  font-size: 0.84rem;
}

.small-project p {
  margin: 0.34rem 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.social-links {
  margin-top: 0.88rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}

.social-links a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.48rem 0.56rem;
  font-size: 0.72rem;
  background: rgba(10, 19, 26, 0.88);
}

.social-links a::before {
  content: "> ";
  color: var(--accent);
}

.social-links a:hover {
  border-color: #255a64;
  background: rgba(66, 214, 255, 0.1);
}

.about-text {
  max-width: 68ch;
  color: var(--muted);
  font-size: 0.83rem;
}

.contact {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  background:
    radial-gradient(circle at 98% 20%, rgba(58, 255, 154, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(12, 23, 31, 0.95), rgba(8, 15, 22, 0.95));
}

.section-head + .contact {
  margin-top: 0.9rem;
}

.contact h2 {
  margin: 0.24rem 0 0.62rem;
  font-size: clamp(1.3rem, 3.8vw, 2.35rem);
  line-height: 0.95;
}

.mail-link {
  color: var(--accent);
  font-size: 1.05rem;
  text-decoration: none;
  text-shadow: 0 0 12px rgba(58, 255, 154, 0.32);
}

.contact-note {
  margin: 0.56rem 0 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 0.8rem;
}

.contact-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.legal-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem 1rem 3.4rem;
}

.legal-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(10, 19, 26, 0.95), rgba(8, 15, 21, 0.95));
  padding: 1.05rem;
  box-shadow: var(--shadow);
}

.legal-card h1 {
  max-width: none;
  margin-top: 0.45rem;
  font-size: clamp(1.5rem, 5vw, 2.8rem);
}

.legal-card h2 {
  margin-top: 1.15rem;
  font-size: 0.95rem;
}

.legal-card h3 {
  margin-top: 1rem;
  font-size: 0.84rem;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  font-size: 0.78rem;
}

.legal-source a {
  color: var(--accent-2);
}

.site-footer {
  margin-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
  padding: 0.92rem 1rem 1.8rem;
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.62rem;
}

.site-footer-left {
  min-height: 1px;
}

.site-footer-copy {
  margin: 0;
  color: #6b9c8f;
  font-size: 0.7rem;
  justify-self: center;
}

.site-footer-links {
  margin: 0;
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.46rem;
  color: #6b9c8f;
  font-size: 0.7rem;
}

.site-footer-links a {
  color: #7fbfb0;
  text-decoration: none;
}

.site-footer-links a:hover {
  color: var(--accent);
}

.project-modal {
  border: 0;
  background: transparent;
  max-width: min(760px, calc(100vw - 2rem));
  width: 100%;
  padding: 0;
}

.project-modal::backdrop {
  background: rgba(0, 6, 9, 0.76);
  animation: modal-backdrop-in 160ms ease;
}

.project-modal-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(9, 18, 25, 0.97), rgba(7, 13, 18, 0.97));
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.5);
  padding: 0.9rem;
}

.project-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

#project-modal-title {
  margin: 0.6rem 0 0;
  font-size: 1.02rem;
}

#project-modal-body {
  margin: 0.46rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.project-modal[open] .project-modal-card {
  animation: modal-in 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-modal.is-closing::backdrop {
  animation: modal-backdrop-out 150ms ease forwards;
}

.project-modal.is-closing .project-modal-card {
  animation: modal-out 150ms ease forwards;
}

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

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes modal-in {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modal-out {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}

@keyframes modal-backdrop-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes modal-backdrop-out {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes blink-cursor {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
    row-gap: 0.5rem;
  }

  .header-center {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .hero-side {
    justify-items: start;
  }

  .hero-side-note {
    text-align: left;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .site-footer-links {
    justify-self: center;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 13px;
  }

  .site-header {
    width: calc(100% - 0.8rem);
    margin-top: 0.5rem;
    padding: 0.56rem;
  }

  .header-left {
    flex-wrap: wrap;
  }

  .header-center {
    width: 100%;
  }

  .terminal-pill {
    width: 100%;
  }

  main {
    padding: 1rem 0.62rem 3.1rem;
  }

  .hero {
    padding: 1rem;
  }

  .contact {
    padding: 0.86rem;
  }
}
