:root {
  --bg: #141415;
  --panel: #1c1c1f;
  --rail: #2a2a2e;
  --card: #2c2d32;
  --cream: #fbf4e0;
  --body: #d8d7d6;
  --muted: #9b9a98;
  --gold: #c79864;
  --green: #00ff41;
  --line: rgba(199, 152, 100, 0.35);
  --sans: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
}

body {
  min-height: 100vh;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 22px 22px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.frame {
  display: grid;
  grid-template-columns: 72px 1fr;
  min-height: 100vh;
  padding: 14px;
  gap: 14px;
}

.rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 22px 0 18px;
  border-radius: 16px;
  background: var(--rail);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--gold);
  line-height: 1;
}

.menu-btn {
  width: 28px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  gap: 5px;
  align-content: center;
}

.menu-btn span {
  display: block;
  height: 2px;
  background: var(--gold);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-btn.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-btn.is-open span:nth-child(2) {
  opacity: 0;
}
.menu-btn.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.rail-copy {
  margin: auto 0 8px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--gold) 70%, white);
  white-space: nowrap;
}

.stage {
  position: relative;
  border-radius: 18px;
  background: var(--panel);
  overflow: hidden;
  min-height: calc(100vh - 28px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.lang {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: #17171a;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lang button {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-width: 42px;
  height: 30px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}

.lang button.is-active {
  background: var(--gold);
  color: #1a140c;
}

.panel {
  display: none;
  height: 100%;
  min-height: calc(100vh - 28px);
}

.panel.is-active {
  display: block;
  animation: rise 0.45s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 28px;
  align-items: center;
  min-height: calc(100vh - 28px);
  padding: 42px 48px 42px 36px;
}

.hero-media {
  position: relative;
  height: min(72vh, 640px);
  border-radius: 22px;
  overflow: hidden;
  border: 3px solid #171717;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  background: #050505;
}

#matrix {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-media-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.hero-copy {
  display: grid;
  gap: 18px;
  justify-items: start;
  padding-right: 24px;
}

.prompt {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--cream);
}

.prompt .gold {
  color: var(--gold);
  margin-right: 8px;
}

.typed {
  margin: 0;
  font-family: var(--mono);
  color: var(--green);
  font-size: clamp(14px, 1.5vw, 18px);
  min-height: 1.5em;
}

.typed .dim {
  color: #6f6f6f;
  margin-right: 8px;
}

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1em;
  margin-left: 2px;
  background: var(--green);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.roles {
  margin: 4px 0 0;
  color: #f5f5f5;
  font-size: clamp(16px, 1.7vw, 20px);
  font-weight: 500;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.socials a {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  display: grid;
  place-items: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.socials a:hover {
  background: var(--gold);
  color: #1a140c;
  transform: translateY(-2px);
}

.socials svg {
  width: 18px;
  height: 18px;
}

.section-scroll {
  height: 100%;
  min-height: calc(100vh - 28px);
  overflow: auto;
  padding: 56px 48px 48px;
}

.section-title {
  margin: 0 0 36px;
  text-align: center;
  color: var(--cream);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.section-title::after {
  content: "";
  display: block;
  width: 54px;
  height: 3px;
  margin: 14px auto 0;
  background: var(--gold);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto 56px;
}

.portrait {
  position: relative;
  padding: 18px 0 0 18px;
}

.portrait-offset {
  position: absolute;
  inset: 0 18px 18px 0;
  background: #101012;
  border-radius: 4px;
}

.portrait-frame {
  position: relative;
  min-height: 420px;
  border: 1px solid color-mix(in srgb, var(--gold) 70%, white);
  border-radius: 4px;
  background:
    radial-gradient(circle at 30% 20%, rgba(199, 152, 100, 0.35), transparent 45%),
    linear-gradient(160deg, #2a2118, #121214 55%, #0c0c0e);
  display: grid;
  place-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.portrait-mark {
  font-size: clamp(72px, 10vw, 120px);
  font-weight: 800;
  letter-spacing: -0.06em;
  color: var(--gold);
  text-shadow: 0 0 40px rgba(199, 152, 100, 0.25);
}

.portrait-caption {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.about-copy h3 {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 22px;
  font-weight: 700;
}

.about-copy p {
  margin: 0 0 16px;
  color: var(--body);
  font-size: 15px;
  line-height: 1.75;
}

.experience-title {
  margin-top: 18px;
}

.exp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto 36px;
}

.exp-card {
  background: var(--card);
  border-radius: 10px;
  padding: 28px 18px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.exp-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  color: var(--gold);
}

.exp-icon svg {
  width: 100%;
  height: 100%;
}

.exp-card h4 {
  margin: 0;
  color: var(--cream);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px 28px;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 18px 12px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 0.8px, transparent 0.8px);
  background-size: 12px 12px;
  border-radius: 12px;
}

.skills div {
  color: #f2f2f2;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}

.skills div::after {
  content: "";
  display: block;
  width: 42px;
  height: 1px;
  margin: 10px auto 0;
  background: var(--gold);
}

.articles-lead {
  margin: -12px auto 28px;
  max-width: 720px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.articles-list {
  display: grid;
  gap: 14px;
  max-width: 920px;
  margin: 0 auto;
}

.article-card {
  display: grid;
  gap: 8px;
  padding: 22px 24px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.article-card:hover {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--card) 88%, var(--gold));
  transform: translateY(-2px);
}

.article-card time {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.article-card h3 {
  margin: 0;
  color: var(--cream);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 700;
  line-height: 1.35;
}

.article-card p {
  margin: 0;
  color: var(--body);
  font-size: 14px;
  line-height: 1.6;
}

.article-open {
  margin-top: 4px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.articles-more {
  display: inline-flex;
  margin: 28px auto 0;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
}

.articles-more:hover {
  border-bottom-color: var(--gold);
}

.section-scroll:has(.articles-list) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.contact-wrap {
  display: flex;
  flex-direction: column;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 28px;
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
  align-items: start;
}

.email-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 120px;
  padding: 24px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  transition: background 0.2s ease;
}

.email-card:hover {
  background: rgba(199, 152, 100, 0.08);
}

.email-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.email-value {
  margin: 0;
  color: var(--cream);
  font-size: 16px;
  font-weight: 600;
  word-break: break-all;
}

.email-card svg {
  width: 34px;
  height: 34px;
  color: var(--gold);
  flex-shrink: 0;
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: var(--card);
  color: var(--cream);
  padding: 14px 16px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.contact-form input:focus,
.contact-form textarea:focus {
  box-shadow: inset 0 0 0 1px var(--gold);
}

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

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.contact-form button {
  width: fit-content;
  min-width: 180px;
  height: 52px;
  border: 0;
  border-radius: 4px;
  background: var(--gold);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.contact-form button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.form-status {
  margin: 0;
  color: var(--green);
  font-family: var(--mono);
  font-size: 13px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(10, 10, 12, 0.94);
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
}

.overlay[hidden] {
  display: none !important;
}

.overlay-nav {
  display: grid;
  gap: 18px;
  text-align: center;
}

.overlay-nav a {
  font-size: clamp(36px, 8vw, 72px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px #fff;
  transition: color 0.2s ease, -webkit-text-stroke 0.2s ease;
}

.overlay-nav a:hover {
  color: var(--gold);
  -webkit-text-stroke: 1.5px var(--gold);
}

@media (max-width: 980px) {
  .hero,
  .about-grid,
  .contact-grid,
  .exp-grid {
    grid-template-columns: 1fr;
  }

  .hero-media {
    display: none;
  }

  .hero {
    padding: 72px 28px 48px;
    justify-items: center;
  }

  .hero-copy {
    justify-items: center;
    text-align: center;
    padding: 0;
  }

  .socials {
    justify-content: center;
  }

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

  .section-scroll {
    padding: 72px 24px 40px;
  }
}

@media (max-width: 720px) {
  .frame {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 10px;
  }

  .rail {
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 12px;
    gap: 12px;
  }

  .logo {
    display: none;
  }

  .rail-copy {
    display: none;
  }

  .menu-btn {
    order: -1;
  }

  .stage {
    min-height: calc(100vh - 76px);
  }

  .panel,
  .section-scroll,
  .hero {
    min-height: calc(100vh - 76px);
  }

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

  .portrait-frame {
    min-height: 280px;
  }
}
