:root {
  /* Palette */
  --orange: #fb923c;
  --bg-dark: #0a0a0a;
  --bg-swe: #050505;
  --bg-swe-radiant: #1a1a1a;
  --bg-photo-fallback: #111;
  --text-light: #f5f5f5;
  --text-dim: rgba(255, 255, 255, 0.45);
  --text-cmd: rgba(255, 255, 255, 0.92);
  --text-output: rgba(255, 255, 255, 0.5);
  --text-locs: rgba(255, 255, 255, 0.7);
  --grid-color: rgba(255, 255, 255, 0.025);

  /* Borders */
  --border-card: rgba(255, 255, 255, 0.06);
  --border-card-mobile: rgba(255, 255, 255, 0.05);
  --border-social: rgba(255, 255, 255, 0.08);
  --border-term-bar: rgba(255, 255, 255, 0.03);

  /* Backgrounds */
  --glass-bg: rgba(0, 0, 0, 0.8);
  --glass-bg-mobile: rgba(0, 0, 0, 0.55);
  --terminal-bg: rgba(0, 0, 0, 0.55);
  --term-bar-bg: rgba(255, 255, 255, 0.02);
  --social-bg: rgba(10, 10, 10, 0.55);
  --dim-overlay: #000;
  --brand-gradient: linear-gradient(to bottom, rgba(0, 0, 0, 0.65) 0%, transparent 100%);
  --photo-overlay: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.15) 35%,
      rgba(0, 0, 0, 0.3) 60%, rgba(0, 0, 0, 0.75) 100%);
  --swe-gradient: radial-gradient(ellipse at 30% 35%, var(--bg-swe-radiant) 0%, var(--bg-swe) 80%);

  /* Radii */
  --radius: 10px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.5);
  --shadow-card-mobile: 0 10px 25px rgba(0, 0, 0, 0.6);
  --shadow-social: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-text: 0 4px 30px rgba(0, 0, 0, 0.9);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", Menlo, monospace;

  /* Transitions */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-flex: 0.8s;
  --duration-fade: 0.5s;
  --duration-dim: 0.7s;
  --duration-social: 0.2s;

  /* Layout - desktop */
  --content-max-width: 580px;
  --content-padding-x: 2rem;
  --brand-py: 1.5rem;
  --brand-px: 1rem;
  --social-bottom: 1.5rem;
  --social-py: 0.65rem;
  --social-px: 1.5rem;
  --social-gap: 1.25rem;
  --social-icon: 18px;
  --grid-size: 40px;

  /* Terminal dots */
  --dot-red: #ff5f56;
  --dot-yellow: #ffbd2e;
  --dot-green: #27c93f;

  /* Name alignment (optical compensation: narrow "z" vs wide "W") */
  --name-gap-left: 0.19em;
  --name-gap-right: 0.11em;
}

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

html,
body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(251, 146, 60, 0.3);
  color: #fed7aa;
}

/* ─── SVG sprite ─── */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ─── Brand ─── */
.brand {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: var(--brand-py) var(--brand-px);
  pointer-events: none;
  background: var(--brand-gradient);
  width: 100vw;
  overflow: hidden;
}

.brand-name {
  position: relative;
  font-size: clamp(1.5rem, 3.5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-shadow: var(--shadow-text);
  height: 1.2em;
}

.brand-name span {
  position: absolute;
  top: 0;
}

.brand-name span:first-child {
  right: calc(50% + var(--name-gap-left));
  font-weight: 600;
}

.brand-name span:last-child {
  left: calc(50% + var(--name-gap-right));
  font-weight: 200;
  color: var(--text-dim);
}

/* ─── Split ─── */
.split {
  display: flex;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

.pane {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: flex var(--duration-flex) var(--ease-expo);
}

.pane-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.pane-swe .pane-bg {
  background: var(--swe-gradient);
}

.pane-swe .pane-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  pointer-events: none;
}

.pane-photo .pane-bg {
  background: url('images/background.webp') center / cover no-repeat;
  background-position: right 63% center;
  background-color: var(--bg-photo-fallback);
}

.pane-photo .pane-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--photo-overlay);
  pointer-events: none;
}

.pane-dim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--dim-overlay);
  opacity: 0;
  transition: opacity var(--duration-dim) ease;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .split:hover .pane-dim {
    opacity: 0.6;
  }

  .split .pane:hover .pane-dim {
    opacity: 0;
  }

  .split:hover .pane {
    flex: 1;
  }

  .split .pane:hover {
    flex: 1.4;
  }

  .pane:hover .pane-content {
    opacity: 1;
  }
}

.pane-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--content-max-width);
  padding: 0 var(--content-padding-x);
  opacity: 0.85;
  transition: opacity var(--duration-fade) var(--ease-expo);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pane-header {
  text-align: center;
}

.pane-title {
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.pane-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.55rem, 0.85vw, 0.85rem);
  color: var(--orange);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ─── Terminal ─── */
.terminal {
  background: var(--terminal-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.9rem;
  background: var(--term-bar-bg);
  border-bottom: 1px solid var(--border-term-bar);
}

.term-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.term-dot:nth-child(1) {
  background: var(--dot-red);
}

.term-dot:nth-child(2) {
  background: var(--dot-yellow);
}

.term-dot:nth-child(3) {
  background: var(--dot-green);
}

.term-body {
  padding: 1rem 1.2rem;
}

.term-line {
  font-family: var(--font-mono);
  font-size: clamp(0.55rem, 0.85vw, 0.9rem);
  line-height: 1.7;
}

.term-line+.term-line {
  margin-top: 0.3rem;
}

.term-line .prompt {
  color: var(--orange);
}

.term-line .cmd {
  color: var(--text-cmd);
}

.term-line.out {
  color: var(--text-output);
}

.term-cursor {
  display: inline-block;
  width: 6px;
  height: 13px;
  background: var(--orange);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

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

/* ─── Glass card ─── */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.25rem 1rem;
  text-align: center;
}

.glass p {
  font-size: clamp(0.75rem, 0.85vw, 0.9rem);
  font-weight: 300;
  line-height: 1.6;
  margin-top: 0.5rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  /* Lifts text off the background */
}

.glass .locs {
  font-family: var(--font-mono);
  font-size: clamp(0.45rem, 0.55vw, 0.6rem);
  color: var(--text-locs);
  margin-top: 0.75rem;
  letter-spacing: 0.05em;
  line-height: 1.8;
}

/* ─── Social pill ─── */
.social {
  position: fixed;
  bottom: var(--social-bottom);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--social-gap);
  padding: var(--social-py) var(--social-px);
  background: var(--social-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-social);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-social);
  opacity: 0;
  animation: fadeUp 1s ease-out 0.3s forwards;
}

.social a {
  color: var(--text-dim);
  transition: color var(--duration-social) ease, transform var(--duration-social) ease;
  display: flex;
}

.social a svg {
  width: var(--social-icon);
  height: var(--social-icon);
}

.social a:hover {
  color: var(--orange);
  transform: translateY(-2px);
}

.social .sep {
  width: 1px;
  height: 16px;
  background: var(--border-social);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translate(-50%, 15px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ─── Mobile ─── */
@media (max-width: 800px) {
  :root {
    --content-max-width: 100%;
    --content-padding-x: 1.25rem;
    --brand-py: 1.5rem;
    --brand-px: 1rem;
    --social-bottom: 1.5rem;
    --social-py: 0.5rem;
    --social-px: 1.25rem;
    --social-gap: 1rem;
    --social-icon: 16px;
  }

  .split {
    flex-direction: column;
    gap: 0.75rem;
    padding: 4rem 1rem 5rem;
    background: var(--bg-dark);
  }

  .pane {
    border-radius: 16px;
    border: 1px solid var(--border-card-mobile);
    min-height: 0;
    flex: 1;
  }

  .pane-bg,
  .pane-bg::after,
  .pane-dim {
    border-radius: inherit;
  }

  .pane-content {
    opacity: 1;
    gap: 0.5rem;
  }

  .pane-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
  }

  .pane-title {
    font-size: 1.3rem;
    margin-bottom: 0;
  }

  .pane-subtitle {
    font-size: 0.75rem;
  }

  .terminal {
    box-shadow: var(--shadow-card-mobile);
  }

  .term-body {
    padding: 0.5rem 0.7rem;
  }

  .term-line {
    font-size: 0.55rem;
    line-height: 1.5;
  }

  .glass {
    background: var(--glass-bg-mobile);
    border: 1px solid var(--border-card-mobile);
    border-radius: 12px;
    padding: 1rem;
  }

  .glass p {
    font-size: 0.75rem;
  }

  .glass .locs {
    display: none;
  }

  .brand {
    padding: var(--brand-py) var(--brand-px) 0.75rem;
  }

  .brand-name {
    position: static;
    height: auto;
    font-size: 1.3rem;
  }

  .brand-name span {
    position: static;
  }

  .social {
    width: auto;
    justify-content: center;
  }

  .split:hover .pane-dim {
    opacity: 0;
  }

  .split .pane:hover {
    flex: 1;
  }
}

@media (max-height: 550px) {
  :root {
    --brand-py: 0.35rem;
    --brand-px: 1rem;
    --social-bottom: 0.35rem;
    --social-py: 0.3rem;
    --social-px: 0.75rem;
    --social-gap: 0.6rem;
  }

  .brand-name {
    position: static;
    height: auto;
    font-size: 1.1rem;
  }

  .brand-name span {
    position: static;
  }

  .pane-content {
    gap: 0.35rem;
  }

  .term-body {
    padding: 0.3rem 0.6rem;
  }

  .term-line {
    font-size: 0.5rem;
    line-height: 1.4;
  }

  .glass {
    padding: 0.5rem;
  }

  .glass p {
    font-size: 0.65rem;
  }
}