:root {
  --bg: #0d151b;
  --bg2: #172630;
  --panel: #18262f;
  --panel2: #22343e;
  --line: #334955;
  --text: #edf3f6;
  --muted: #a7b6bf;
  --gold: #d3aa58;
  --green: #80cfa2;
  --terminal: #071014;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, #36526333, transparent 32rem),
    linear-gradient(180deg, var(--bg2), var(--bg));
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

.software-site {
  width: 100%;
  max-width: 1180px;
  margin: auto;
  padding: 0 22px;
}

.software-heading {
  max-width: 780px;
  padding: 40px 0 30px;
}

.section-kicker {
  margin: 0 0 0.7rem;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.software-heading h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.software-heading > p:last-child {
  max-width: 720px;
  margin: 1rem 0 0;
  color: #bdc8cf;
  font-size: 0.95rem;
  line-height: 1.65;
}

.window-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 37px;
  padding: 7px 12px;
  border-bottom: 1px solid #ffffff12;
  background: linear-gradient(#2b3c46, #1d2b34);
  color: #c8d2d8;
  font-size: 0.65rem;
}

.window-bar p {
  overflow: hidden;
  margin: 0;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #778991;
  box-shadow: inset 0 1px 1px #ffffff33;
}

.window-dots i:first-child {
  background: #b65d56;
}

.window-dots i:nth-child(2) {
  background: #c29b51;
}

.window-dots i:last-child {
  background: #61906f;
}

.window-kind {
  color: #8397a1;
  font: 700 0.53rem/1 monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-intro {
  overflow: hidden;
  border: 1px solid #435761;
  border-radius: 12px;
  background: var(--terminal);
  box-shadow: 0 22px 45px #0006;
}

.terminal-screen {
  min-height: 190px;
  padding: 26px 30px;
  background:
    linear-gradient(#ffffff04 1px, transparent 1px) 0 0 / 100% 4px,
    radial-gradient(circle at 15% 0%, #64b88a14, transparent 28rem),
    var(--terminal);
  color: #b7c8c0;
  font: 400 0.78rem/1.75 "Courier New", monospace;
}

.terminal-screen p {
  margin: 0;
}

.terminal-output {
  padding: 8px 0 12px 18px;
  color: #91a79d;
}

.terminal-output b {
  display: inline-block;
  min-width: 78px;
  color: #d5bc7b;
  font-weight: 400;
}

.prompt {
  color: var(--green);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  vertical-align: -0.15em;
  background: #a9d9bc;
  animation: cursor-blink 1.1s steps(1) infinite;
}

.software-tools,
.own-projects {
  margin-top: 78px;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.75fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  font: 400 clamp(2rem, 5vw, 3.6rem)/1 Georgia, "Times New Roman", serif;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.windows-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  align-items: start;
}

.app-window,
.qslet-window {
  overflow: hidden;
  border: 1px solid #40545e;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--panel2), var(--panel));
  box-shadow: 0 22px 45px #0004;
}

.app-window:nth-child(2n) {
  margin-top: 30px;
}

.app-shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #354a54;
  background: #0a1217;
  cursor: zoom-in;
}

.app-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 1.72;
  object-fit: cover;
  object-position: top;
  transition: opacity 160ms ease;
}

.app-shot:hover img {
  opacity: 0.88;
}

.app-copy {
  padding: 21px 22px 23px;
}

.app-copy h3 {
  margin: 0;
  font-size: 1.2rem;
}

.app-copy > p {
  margin: 0.65rem 0 0;
  color: #b7c4cb;
  font-size: 0.8rem;
  line-height: 1.65;
}

.app-copy .app-use {
  padding-top: 0.7rem;
  border-top: 1px solid #ffffff0d;
  color: #94a8b2;
}

.app-use b {
  color: #d6bc7c;
}

.app-copy a {
  display: inline-block;
  margin-top: 1rem;
  color: #dfc681;
  font-size: 0.7rem;
  font-weight: 800;
  text-decoration: none;
}

.qslet-window {
  border-color: #57664f;
  background:
    radial-gradient(circle at 10% 0%, #80cfa21c, transparent 28rem),
    linear-gradient(145deg, #21353a, #142229);
}

.project-status {
  color: #8fd2a7;
}

.qslet-layout {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 35px;
  padding: clamp(25px, 5vw, 48px);
}

.qslet-copy {
  align-self: center;
}

.qslet-icon {
  display: block;
  width: 76px;
  height: 76px;
  margin-bottom: 23px;
  object-fit: contain;
  filter: drop-shadow(0 10px 15px #0005);
}

.qslet-copy h3 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.qslet-lead {
  color: #edf3f6 !important;
  font: italic 1.12rem/1.5 Georgia, "Times New Roman", serif;
}

.qslet-copy > p:not(.section-kicker) {
  margin: 1rem 0 0;
  color: #b3c2ca;
  font-size: 0.82rem;
  line-height: 1.7;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.tech-list li {
  padding: 6px 9px;
  border: 1px solid #52655d;
  border-radius: 5px;
  background: #0d181db3;
  color: #9fc7ad;
  font: 700 0.58rem/1 monospace;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.project-links a {
  padding: 9px 12px;
  border: 1px solid #4b6068;
  border-radius: 7px;
  color: #d3dde1;
  font-size: 0.67rem;
  font-weight: 800;
  text-decoration: none;
}

.project-links .primary-link {
  border-color: #73927d;
  background: #80cfa214;
  color: #aee2bf;
}

.qslet-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-self: center;
}

.qslet-gallery button {
  overflow: hidden;
  min-width: 0;
  padding: 5px;
  border: 1px solid #415660;
  border-radius: 7px;
  background: #0a1318;
  cursor: zoom-in;
}

.qslet-gallery .qslet-main-shot {
  grid-column: 1 / -1;
}

.qslet-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 1.65;
  object-fit: cover;
  object-position: top;
}

.future-notes {
  position: relative;
  overflow: hidden;
  margin-top: 70px;
  padding: 34px;
  border: 1px dashed #3d535e;
  border-radius: 12px;
  background: #ffffff04;
}

.future-notes h2 {
  margin: 0;
  font: 400 1.6rem/1.2 Georgia, "Times New Roman", serif;
}

.future-notes > p:last-of-type {
  max-width: 680px;
  margin: 0.7rem 0 0;
  color: #94a6af;
  font-size: 0.8rem;
  line-height: 1.65;
}

.future-notes > span {
  position: absolute;
  right: 30px;
  bottom: 18px;
  color: #80cfa280;
  font: 400 2rem/1 monospace;
  animation: cursor-blink 1.1s steps(1) infinite;
}

#software-dialog {
  max-width: 95vw;
  max-height: 94vh;
  padding: 14px;
  border: 1px solid #435866;
  border-radius: 12px;
  background: #101820;
  color: var(--text);
}

#software-dialog::backdrop {
  background: #081016ed;
}

#software-image {
  display: block;
  width: min(1200px, 88vw);
  height: 76vh;
  margin: auto;
  object-fit: contain;
}

#software-caption {
  max-width: 1000px;
  text-align: center;
  font-size: 0.8rem;
}

.dialog-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.dialog-controls button {
  padding: 8px 12px;
  border: 1px solid #435866;
  border-radius: 6px;
  background: #1d2b36;
  color: white;
  cursor: pointer;
}

@keyframes cursor-blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor,
  .future-notes > span {
    animation: none;
  }

  .app-shot img {
    transition: none;
  }
}

@media (max-width: 820px) {
  .section-heading {
    grid-template-columns: 1fr;
    gap: 15px;
  }

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

  .app-window:nth-child(2n) {
    margin-top: 0;
  }

  .qslet-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .software-site {
    padding: 0 14px;
  }

  .terminal-screen {
    min-height: 210px;
    padding: 21px 17px;
    font-size: 0.69rem;
    overflow-wrap: anywhere;
  }

  .terminal-output {
    padding-left: 9px;
  }

  .terminal-output b {
    min-width: 66px;
  }

  .software-tools,
  .own-projects {
    margin-top: 55px;
  }

  .window-kind {
    display: none;
  }

  .window-bar {
    grid-template-columns: auto 1fr;
  }

  .app-copy {
    padding: 18px;
  }

  .qslet-layout {
    gap: 25px;
    padding: 24px 17px;
  }

  .qslet-icon {
    width: 62px;
    height: 62px;
  }

  .qslet-gallery {
    gap: 6px;
  }

  .future-notes {
    margin-top: 50px;
    padding: 25px 20px 45px;
  }

  #software-image {
    width: 90vw;
    height: 70vh;
  }
}
