/* =========================
   RESET / BASE
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
}

:root {
  --bg: #05070d url("/images/graphy-dark2.png") repeat top left;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.055);
  --stroke: rgba(255, 255, 255, 0.11);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.66);
  --muted-2: rgba(255, 255, 255, 0.52);
  --accent: #5f8fff;
  --accent-2: #00e3bb;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 24px;
  --radius-sm: 16px;
  --header-h: 78px;

  --article-max: 760px;
  --article-wide: 1120px;
  --article-aside: 250px;
}

body {
  margin: 0;
  padding-top: var(--header-h);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 720px at 16% -10%, rgba(255, 255, 255, 0.055), transparent 58%),
    radial-gradient(1000px 680px at 85% 0%, rgba(255, 255, 255, 0.03), transparent 55%),
    var(--bg);
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(100% - 36px, 1380px);
  margin: 0 auto;
}

.container {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 0 16px;
}

/* =========================
   HEADER / NAV
========================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(7, 10, 18, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand img {
  width: 10rem;
  height: auto;
}

#nav-toggle {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav a {
  position: relative;
  font-weight: 500;
  font-family: "IBM Plex Mono", monospace;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: color 0.3s ease;
  text-transform: uppercase;
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
}

.nav-sep {
  color: rgba(255, 255, 255, 0.35);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  user-select: none;
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.lang-link {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.lang-link.is-active {
  color: var(--text);
}

.lang-sep {
  color: rgba(255, 255, 255, 0.22);
}

.nav-toggle-btn {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  z-index: 40;
  position: relative;
  align-items: center;
  justify-content: center;
}

.nav-toggle-btn span {
  position: absolute;
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle-btn span:nth-child(1) {
  transform: translateY(-6px);
}

.nav-toggle-btn span:nth-child(2) {
  transform: translateY(0);
}

.nav-toggle-btn span:nth-child(3) {
  transform: translateY(6px);
}

.nav-overlay {
  display: none;
}

/* =========================
   ARTICLE HERO
========================= */

.article-hero {
  padding: clamp(40px, 6vw, 72px) 0 2rem;
}

.article-hero__inner {
  max-width: 940px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.4rem;
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.article-back:hover {
  color: var(--text);
  transform: translateX(-2px);
}

.article-hero__content {
  max-width: 840px;
}

.article-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 0.85rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(173, 255, 240, 0.86);
}

.article-title {
  margin: 0;
  max-width: 18ch;
  font-family: "Michroma", sans-serif;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.28;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.96);
}

.article-lead {
  margin: 1.25rem 0 0;
  max-width: 68ch;
  font-size: clamp(1rem, 1.1vw, 1.12rem);
  line-height: 1.9;
  color: var(--muted);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-top: 1.35rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

/* =========================
   ARTICLE BODY
========================= */

.article-section {
  padding: 0 0 5rem;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--article-aside)) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.article-side {
  position: relative;
}

.article-side__card {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  padding: 1.2rem 1.1rem;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.018)),
    radial-gradient(circle at top right, rgba(255,255,255,0.03), transparent 42%);
  border: 1px solid rgba(255,255,255,0.1);
}

.article-side__label {
  margin-bottom: 0.8rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(173, 255, 240, 0.82);
}

.article-toc {
  display: grid;
  gap: 0.75rem;
}

.article-toc a {
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem;
  line-height: 1.55;
  transition: color 0.2s ease, transform 0.2s ease;
}

.article-toc a:hover {
  color: rgba(255,255,255,0.95);
  transform: translateX(2px);
}

.article-body {
  max-width: var(--article-max);
  width: 100%;
}

.article-body > *:first-child {
  margin-top: 0;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote {
  margin: 0 0 1.35rem;
}

.article-body p {
  color: rgba(255,255,255,0.82);
  font-size: 1.02rem;
  line-height: 1.95;
}

.article-body h2 {
  margin: 3rem 0 1rem;
  font-family: "Michroma", sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.45;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.96);
}

.article-body h3 {
  margin: 2.2rem 0 0.8rem;
  font-size: 1.05rem;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.95);
}

.article-body ul,
.article-body ol {
  padding-left: 1.3rem;
  color: rgba(255,255,255,0.82);
}

.article-body li {
  margin-bottom: 0.55rem;
  line-height: 1.9;
}

.article-body strong {
  color: rgba(255,255,255,0.96);
}

.article-body a {
  color: rgba(173, 255, 240, 0.92);
  text-decoration: underline;
  text-decoration-color: rgba(173, 255, 240, 0.28);
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: #ffffff;
  text-decoration-color: rgba(255,255,255,0.45);
}

.article-callout {
  margin: 2rem 0;
  padding: 1.15rem 1.2rem;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.018)),
    radial-gradient(circle at top right, rgba(255,255,255,0.025), transparent 42%);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.84);
  line-height: 1.8;
}

.article-quote {
  margin: 2rem 0;
  padding: 1.25rem 1.35rem;
  border-left: 3px solid rgba(173, 255, 240, 0.55);
  background: rgba(255,255,255,0.025);
  color: rgba(255,255,255,0.88);
  font-size: 1rem;
  line-height: 1.9;
}

.article-endnote {
  margin-top: 2.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.article-endnote p {
  color: rgba(255,255,255,0.78);
}

/* =========================
   CONTACT
========================= */

.contact-section {
  position: relative;
  padding: 7rem 0 0;
  background: linear-gradient(180deg, #050505 0%, #020202 100%);
  color: #f5f5f5;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.section-header-minimal {
  max-width: 760px;
  margin-bottom: 3rem;
}

.section-header-minimal .section-index {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.section-header-minimal h2 {
  margin: 0 0 1rem;
  font-family: "Michroma", sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  line-height: 1.18;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.section-header-minimal p {
  margin: 0;
  max-width: 62ch;
  font-size: 1rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.68);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
}

.contact-block {
  position: relative;
  padding: 2.75rem;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.contact-block:first-child {
  border-right: 1px solid rgba(255,255,255,0.08);
}

.contact-block::after {
  content: "";
  position: absolute;
  top: 28px;
  right: 28px;
  width: 40px;
  height: 40px;
  border-top: 1px solid rgba(255,255,255,0.2);
  border-right: 1px solid rgba(255,255,255,0.2);
  pointer-events: none;
}

.contact-label {
  display: inline-block;
  margin-bottom: 1.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.46);
}

.contact-block h3 {
  margin: 0 0 1rem;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #ffffff;
}

.contact-text,
.contact-note-text {
  max-width: 44ch;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.68);
}

.contact-note-list {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
}

.contact-note-list li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.62);
}

.contact-note-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}

.reveal-mail {
  margin-top: auto;
  width: fit-content;
}

.reveal-mail summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1rem;
  border: 1px solid rgba(255,255,255,0.16);
  background: transparent;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.reveal-mail summary::-webkit-details-marker {
  display: none;
}

.reveal-mail summary:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.28);
}

.reveal-mail[open] summary {
  margin-bottom: 1rem;
}

.contact-value {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.06rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.025);
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.6;
  word-break: break-word;
}

/* =========================
   FOOTER
========================= */

.site-footer-minimal {
  position: relative;
  background: #020202;
  color: #f5f5f5;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(0, 2fr);
  gap: 4rem;
  padding: 4rem 0 3rem;
}

.footer-brand img {
  width: clamp(150px, 18vw, 220px);
  height: auto;
  display: block;
  margin-bottom: 1.25rem;
  filter: grayscale(1) brightness(1.08);
}

.footer-tagline {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.footer-description {
  max-width: 42ch;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.66);
}

.footer-nav-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.footer-col h4 {
  margin: 0 0 1.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
}

.footer-col a,
.footer-col summary {
  display: block;
  margin-bottom: 0.9rem;
  color: rgba(255,255,255,0.66);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.7;
  transition: color 0.2s ease;
}

.footer-col a:hover,
.footer-col summary:hover {
  color: #ffffff;
}

.reveal-mail--footer summary {
  padding: 0;
  min-height: auto;
  border: none;
  background: transparent;
  letter-spacing: 0.08em;
  font-size: 0.92rem;
  text-transform: none;
  font-weight: 400;
  color: rgba(255,255,255,0.66);
}

.reveal-mail--footer[open] summary {
  margin-bottom: 0.9rem;
}

.reveal-mail--footer .contact-value {
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-legal a {
  color: rgba(255,255,255,0.5);
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: #ffffff;
}

/* =========================
   RESPONSIVE NAV
========================= */

@media (min-width: 981px) {
  .nav {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    pointer-events: auto;
    transform: none;
  }
}

@media (max-width: 980px) {
  .nav-toggle-btn {
    display: inline-flex;
    margin: 0;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 25;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(78vw, 340px);
    height: 100vh;
    padding: 6rem 1.5rem 2rem;
    background: rgba(1, 1, 2, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1.2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 30;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
  }

  .nav a {
    font-size: 1.05rem;
  }

  .nav-sep {
    display: none;
  }

  .lang {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
  }

  #nav-toggle:checked ~ .nav {
    transform: translateX(0);
  }

  #nav-toggle:checked ~ .nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  #nav-toggle:checked + .nav-toggle-btn span:nth-child(1) {
    transform: rotate(45deg);
  }

  #nav-toggle:checked + .nav-toggle-btn span:nth-child(2) {
    opacity: 0;
  }

  #nav-toggle:checked + .nav-toggle-btn span:nth-child(3) {
    transform: rotate(-45deg);
  }

  #nav-toggle:checked + .nav-toggle-btn {
    border-color: rgba(0, 255, 200, 0.24);
    background: rgba(255, 255, 255, 0.1);
  }
}

/* =========================
   RESPONSIVE ARTICLE
========================= */

@media (max-width: 1080px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .article-side__card {
    position: relative;
    top: 0;
  }
}

@media (max-width: 900px) {
  .contact-grid,
  .footer-top,
  .footer-nav-wrap {
    grid-template-columns: 1fr;
  }

  .contact-block:first-child {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .contact-block {
    min-height: auto;
    padding: 2rem;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 1380px);
  }

  .article-hero {
    padding: 26px 0 1.5rem;
  }

  .article-title {
    font-size: clamp(1.45rem, 8vw, 2.15rem);
    max-width: 100%;
  }

  .article-lead {
    font-size: 0.98rem;
  }

  .article-body p,
  .article-body li,
  .contact-text,
  .contact-note-text,
  .footer-description {
    font-size: 0.95rem;
  }

  .footer-top {
    gap: 2.5rem;
  }

  .footer-nav-wrap {
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .contact-section {
    padding: 6rem 0 0;
  }

  .section-header-minimal {
    margin-bottom: 2rem;
  }

  .section-header-minimal h2 {
    font-size: clamp(1.55rem, 7vw, 2.2rem);
  }

  .contact-block {
    padding: 1.5rem;
  }

  .contact-block::after {
    top: 20px;
    right: 20px;
    width: 28px;
    height: 28px;
  }

  .reveal-mail {
    width: 100%;
  }

  .reveal-mail summary {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1rem;
    text-align: center;
  }

  .contact-value {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .footer-top {
    padding: 3rem 0 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  body {
    padding-top: 72px;
  }

  .brand img {
    width: 8.5rem;
  }

  .article-meta {
    gap: 0.5rem 0.8rem;
    font-size: 0.68rem;
  }

  .article-body h2 {
    font-size: 1rem;
  }

  .article-callout,
  .article-quote {
    padding: 1rem;
  }
}