/* =====================================================
   wiceh — contacts
   editorial · dark · grid-framed
   ===================================================== */

:root {
  --bg: #0c0c0d;
  --bg-soft: #131315;
  --bg-softer: #18181a;
  --ink: #ededec;
  --ink-soft: #8a8a86;
  --ink-faint: #4a4a47;
  --rule: #232325;
  --rule-soft: #18181a;
  --accent: #6abac8;          /* warm brass */
  --accent-soft: #2c465a;
  --highlight: #d0eff1;
  --danger: #d4543a;
  --green: #5fbf6c;

  --serif: "Fraunces", "Times New Roman", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --frame-pad: clamp(16px, 2.4vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ----------- reset ----------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
img, svg { display: block; }
button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; }
input { font: inherit; background: none; border: 0; color: inherit; outline: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 720px) {
  body { cursor: auto; }
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ----------- background atmosphere ----------- */
.bg {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg__grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(to right, var(--rule-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 80%);
  opacity: .6;
}

.bg__noise {
  position: absolute; inset: 0;
  opacity: .04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .8 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.bg__glow {
  position: absolute;
  width: 60vmax; height: 60vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .12;
}
.bg__glow--a {
  top: -25vmax; left: -20vmax;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  animation: drift 22s var(--ease) infinite alternate;
}
.bg__glow--b {
  bottom: -30vmax; right: -25vmax;
  background: radial-gradient(circle, #3a5d6e 0%, transparent 60%);
  animation: drift 28s var(--ease) infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(8vmax, -4vmax) scale(1.1); }
}

/* ----------- frame (top / bottom / side) ----------- */
.frame {
  position: fixed;
  z-index: 5;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  pointer-events: none;
}
.frame__label { pointer-events: auto; }
.frame__label--right { margin-left: auto; }
.frame__label--center { position: absolute; left: 50%; transform: translateX(-50%); }

.frame--top, .frame--bottom {
  left: var(--frame-pad);
  right: var(--frame-pad);
  height: 40px;
  justify-content: space-between;
  border-color: var(--rule);
}
.frame--top    { top: 0;    border-bottom: 1px solid var(--rule); }
.frame--bottom { bottom: 0; border-top: 1px solid var(--rule); }

.frame--side {
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center;
  white-space: nowrap;
  font-size: 10px;
  color: var(--ink-faint);
}

@media (max-width: 720px) {
  .frame--side { display: none; }
  .frame__label--center { display: none; }
}

.dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  margin-right: 8px;
  vertical-align: 1px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .4; }
}

/* ============================================================
   BOOT SEQUENCE
   ============================================================ */
.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--frame-pad);
  transition: opacity .5s var(--ease), visibility .5s var(--ease);
}
body:not(.is-booting) .boot {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot__inner {
  width: 100%;
  max-width: 720px;
  position: relative;
}

.boot__log {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 60vh;
}
.boot__log .ok    { color: var(--green); }
.boot__log .warn  { color: var(--accent); }
.boot__log .ink   { color: var(--ink); }
.boot__log .faint { color: var(--ink-faint); }

.boot__log .caret {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  vertical-align: -2px;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink {
  to { visibility: hidden; }
}

.boot__skip {
  position: absolute;
  bottom: -40px;
  right: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color .2s var(--ease);
}
.boot__skip:hover { color: var(--accent); }

/* hide page content while booting */
body.is-booting .stage,
body.is-booting .frame,
body.is-booting .bg {
  opacity: 0;
}
.stage, .frame, .bg {
  transition: opacity .8s var(--ease);
}

/* ----------- stage ----------- */
.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px var(--frame-pad);
  gap: clamp(40px, 6vh, 80px);
}

/* ----------- hero ----------- */
.hero {
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: clamp(20px, 4vh, 36px);
  opacity: 0;
  animation: fadeUp .9s var(--ease) .2s forwards;
}
.hero__eyebrow-line {
  width: 40px; height: 1px;
  background: var(--accent-soft);
}

.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(56px, 12vw, 168px);
  line-height: .95;
  letter-spacing: -0.04em;
  color: var(--ink);
  position: relative;
  display: inline-block;
  opacity: 0;
  animation: fadeUp 1s var(--ease) .35s forwards;
}
.hero__title em {
  font-style: italic;
  color: var(--accent);
  font-feature-settings: "ss01" on;
}
.hero__title::before,
.hero__title::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--accent);
}
.hero__title::before { top: -10px; left: -22px; border-right: none; border-bottom: none; }
.hero__title::after  { bottom: -10px; right: -22px; border-left: none; border-top: none; }

.hero__sub {
  margin-top: clamp(20px, 4vh, 36px);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--ink-soft);
  opacity: 0;
  animation: fadeUp 1s var(--ease) .55s forwards;
}
.hero__highlight {
  color: var(--highlight);
  border-bottom: 1px dashed var(--accent-soft);
  padding-bottom: 2px;
}

/* ----------- contacts grid ----------- */
.contacts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  opacity: 0;
  animation: fadeUp 1s var(--ease) .8s forwards;
}

@media (max-width: 920px) {
  .contacts { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  border: 1px solid var(--rule);
  padding: 28px 26px 26px;
  min-height: 200px;
  overflow: hidden;
  transition: border-color .4s var(--ease), transform .4s var(--ease);
  display: flex;
  flex-direction: column;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(200,169,106,.06) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .9s var(--ease);
  pointer-events: none;
}
.card::after {
  content: "";
  position: absolute;
  top: 10px; right: 10px;
  width: 8px; height: 8px;
  border-top: 1px solid var(--ink-faint);
  border-right: 1px solid var(--ink-faint);
  transition: border-color .4s var(--ease);
}
.card:hover { border-color: var(--accent-soft); }
.card:hover::before { transform: translateX(100%); }
.card:hover::after  { border-color: var(--accent); }

.card__index {
  position: absolute;
  bottom: 16px; right: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 56px;
  line-height: 1;
  color: var(--ink-faint);
  opacity: .35;
  pointer-events: none;
  transition: color .4s var(--ease), opacity .4s var(--ease);
}
.card:hover .card__index {
  color: var(--accent);
  opacity: .55;
}

.card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.card__icon {
  width: 18px; height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}
.card--github .card__icon { width: 16px; height: 16px; }
.card__kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.card__list {
  display: flex;
  flex-direction: column;
}
.card__divider {
  height: 1px;
  background: var(--rule-soft);
  margin: 6px 0;
}

/* ----------- link rows ----------- */
.link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  position: relative;
  transition: color .25s var(--ease), padding .25s var(--ease);
}
.link__text {
  position: relative;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .35s var(--ease);
}
.link__arrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-faint);
  transform: translate(-4px, 0);
  opacity: 0;
  transition: transform .35s var(--ease), opacity .35s var(--ease), color .35s var(--ease);
}
.link:hover {
  color: var(--highlight);
  padding-left: 6px;
}
.link:hover .link__text { background-size: 100% 1px; }
.link:hover .link__arrow {
  opacity: 1;
  transform: translate(0, -2px) rotate(0deg);
  color: var(--accent);
}

.link--single { padding-top: 4px; }

/* ============================================================
   EDITORIAL SECTION (about / work / stack)
   ============================================================ */
.editorial {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding-top: clamp(40px, 8vh, 80px);
}

.editorial__rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(32px, 6vh, 56px);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.editorial__rule-line {
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.editorial__rule-label { flex-shrink: 0; }

.editorial__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

@media (max-width: 920px) {
  .editorial__grid { grid-template-columns: 1fr; gap: 40px; }
}

.editorial__col { position: relative; }

.editorial__heading {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.editorial__heading-mark { color: var(--accent); }

.editorial__lede {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 16px;
}
.editorial__lede em {
  font-style: italic;
  color: var(--accent);
}

.editorial__drop {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 3.4em;
  line-height: 0.85;
  color: var(--accent);
  float: left;
  padding: 4px 8px 0 0;
  margin-top: 4px;
}

.editorial__body {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.inline-link {
  color: var(--ink);
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 1px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.inline-link:hover { color: var(--accent); border-color: var(--accent); }

/* selected work list */
.works {
  display: flex;
  flex-direction: column;
}
.work {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.work:last-child { border-bottom: 0; }
.work__num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 14px;
  color: var(--accent);
}
.work__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.work__title {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
}
.work__meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.work__year {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: .1em;
}

/* stack tags */
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}
.stack__tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .05em;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  background: var(--bg-soft);
  transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.stack__tag:hover {
  border-color: var(--accent-soft);
  color: var(--ink);
  transform: translateY(-2px);
}
.stack__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--ink-faint);
  transition: color .25s var(--ease), transform .25s var(--ease);
}
.stack__tag:hover .stack__icon {
  color: var(--accent);
  transform: rotate(-4deg);
}
.stack__tag--ghost {
  border-style: dashed;
  background: transparent;
  color: var(--ink-faint);
  font-style: italic;
}

.editorial__hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.editorial__hint kbd {
  display: inline-block;
  padding: 2px 7px;
  margin: 0 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--bg-soft);
}

/* ============================================================
   COMMAND PALETTE
   ============================================================ */
.palette {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
}
.palette[hidden] { display: none; }

.palette__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 9, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: paletteFade .25s var(--ease);
}

.palette__panel {
  position: relative;
  width: min(640px, calc(100% - 32px));
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(200, 169, 106, 0.06);
  animation: paletteIn .3s var(--ease);
  overflow: hidden;
}
.palette__panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .5;
}

@keyframes paletteFade {
  from { opacity: 0; }
}
@keyframes paletteIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.palette__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 13px;
}
.palette__prompt {
  color: var(--accent);
  font-size: 12px;
}
.palette__sep {
  color: var(--ink-faint);
}
.palette__input {
  flex: 1;
  color: var(--ink);
  caret-color: var(--accent);
}
.palette__input::placeholder {
  color: var(--ink-faint);
}
.palette__hint {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--rule);
  padding: 2px 6px;
}

.palette__body {
  max-height: 50vh;
  overflow-y: auto;
}
.palette__list { padding: 6px; }

.palette__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.palette__item:hover,
.palette__item.is-active {
  background: var(--bg-softer);
  color: var(--ink);
  border-color: var(--rule);
}
.palette__item-cmd {
  color: var(--accent);
  font-weight: 500;
  min-width: 80px;
}
.palette__item-desc {
  color: var(--ink-soft);
  font-size: 12px;
}
.palette__item:hover .palette__item-desc,
.palette__item.is-active .palette__item-desc {
  color: var(--ink);
}
.palette__item-key {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-faint);
}

.palette__output {
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  white-space: pre-wrap;
}
.palette__output strong { color: var(--accent); font-weight: 500; }
.palette__output em { color: var(--ink); font-style: italic; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 300;
  padding: 10px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--accent-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  pointer-events: none;
}
.toast[hidden] { display: none; }
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ----------- custom cursor ----------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}
.cursor__dot {
  position: fixed;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--highlight);
  transform: translate(-50%, -50%);
  transition: width .2s var(--ease), height .2s var(--ease), opacity .2s var(--ease);
  will-change: transform;
}
.cursor__ring {
  position: fixed;
  width: 22px; height: 22px;
  border: 1px solid rgba(241, 231, 208, 0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .25s var(--ease), height .25s var(--ease), border-color .25s var(--ease);
  will-change: transform;
}
.cursor.is-hover .cursor__dot { opacity: 0; }
.cursor.is-hover .cursor__ring { width: 36px; height: 36px; border-color: var(--accent); }

@media (max-width: 720px) {
  .cursor { display: none; }
}

/* ----------- animations ----------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}