/* ── FONTS ─── */
@font-face {
  font-family: 'RetorikaMono';
  src: url('assets/fonts/RetorikaMono/RetorikaMono-Regular.otf') format('opentype');
  font-weight: 400;
}

@font-face {
  font-family: 'RetorikaMono';
  src: url('assets/fonts/RetorikaMono/RetorikaMono-Medium.otf') format('opentype');
  font-weight: 500;
}

@font-face {
  font-family: 'RetorikaMono';
  src: url('assets/fonts/RetorikaMono/RetorikaMono-Semibold.otf') format('opentype');
  font-weight: 600;
}

@font-face {
  font-family: 'RetorikaMono';
  src: url('assets/fonts/RetorikaMono/RetorikaMono-Bold.otf') format('opentype');
  font-weight: 700;
}

@font-face {
  font-family: 'Agave';
  src: url('assets/fonts/Agave/Agave-Regular.ttf') format('truetype');
  font-weight: 400;
}

@font-face {
  font-family: 'Agave';
  src: url('assets/fonts/Agave/Agave-Bold.ttf') format('truetype');
  font-weight: 700;
}

@font-face {
  font-family: 'TRTTerminal';
  src: url('assets/fonts/TRTTerminal/TRTTerminalMonoDemo-Regular.ttf') format('truetype');
  font-weight: 400;
}

@font-face {
  font-family: 'TRTTerminal';
  src: url('assets/fonts/TRTTerminal/TRTTerminalMonoDemo-Bold.ttf') format('truetype');
  font-weight: 700;
}

@font-face {
  font-family: 'Chillax';
  src: url('assets/fonts/Chillax/Chillax-Variable.ttf') format('truetype');
  font-weight: 200 700;
}


/* ── TOKENS ─── */
:root {
  --bg: #FFF;
  --text: #0F0F0E;
  --border: rgba(15, 15, 14, 0.1);
  --col-left-width: 160px;
  --col-right-width: 200px;
}


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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Clash Display', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}


/* ── PROGRESS BAR ─── */
.prog {
  position: fixed;
  top: 0;
  left: 0;
  height: 1px;
  width: 0;
  background: var(--text);
  z-index: 9999;
  transition: width .08s linear;
  pointer-events: none;
}


/* ══════════════════════════════════════════════
   PRE-SCROLL OVERLAY BAR
   ══════════════════════════════════════════════ */

.pre-scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 28px 44px 0;
  pointer-events: none;
  opacity: 1;
 /* transition: opacity 0.35s ease; */
}

.pre-scroll-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(to bottom, var(--bg) 55%, transparent 100%);
  opacity: var(--bg-fade, 1);
  z-index: -1;
  pointer-events: none;
  transition: none;
}

body.scrolled .pre-scroll-bar {
  opacity: 0;
  pointer-events: none !important;
}

.psb-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-end;
}

.psb-wordmark {
  font-family: 'Chillax', sans-serif;
  font-weight: 700;
  font-size: clamp(56px, 9vw, 104px);
  line-height: 1;
  letter-spacing: -0.04em;
  user-select: none;
  display: flex;
  justify-content: center;
  align-items: baseline;
  cursor: default;
  white-space: nowrap;
  /* JS sets opacity:0 during fly-in */
}

.psb-right {
  position: absolute;
  top: 28px;
  right: 44px;
  pointer-events: auto;
}

#preScrollNav {
  display: flex;
  justify-content: center;
  gap: 60px;
  padding: 14px 0 0;
  pointer-events: auto;
  transform-style: preserve-3d;
  overflow: visible;
  position: relative;
  /* so transform-origin is predictable */
}


/* ══════════════════════════════════════════════
   DESKTOP GRID
   ══════════════════════════════════════════════ */

.page-grid {
  display: grid;
  grid-template-columns: 0px 1fr 0px;
  grid-template-areas: "left main right";
  min-height: 100vh;
}

body.scrolled .page-grid {
  grid-template-columns: var(--col-left-width) 1fr var(--col-right-width);
  transition: grid-template-columns 0.5s cubic-bezier(.25, .46, .45, .94);
}


/* ── LEFT COLUMN ─── */
.col-left {
  grid-area: left;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
}

body.scrolled .col-left {
  pointer-events: auto;
  overflow: visible;
}

.col-left-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--col-left-width);
  height: 100%;
  padding: 28px 0 28px 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* nav fades in; wordmark handled by fly-in */
}

/* Sidebar wordmark — hidden until fly-in lands */
#sidebarWordmark {
  font-family: 'Chillax', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 48px);
  line-height: 1;
  letter-spacing: -0.04em;
  user-select: none;
  white-space: nowrap;
  cursor: default;
  opacity: 0;
  /* shown by JS after fly-in completes */
  transition: opacity 0.15s ease;
}


/* ── RIGHT COLUMN ─── */
.col-right {
  grid-area: right;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
}

body.scrolled .col-right {
  pointer-events: auto;
  overflow: visible;
}

.col-right-inner {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--col-right-width);
  height: 100%;
  padding: 28px 44px 28px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  opacity: 0;
  /* contact cross-fades; JS also handles timing */
  transition: opacity 0.3s ease;
}

body.scrolled .col-right-inner {
  opacity: 1;
}

.contact-block-sidebar {
  position: relative;
  /* add this — needed for ::after to position correctly */
  display: inline-flex;
  flex-direction: column;
  width: fit-content;
}

.contact-block-sidebar::after {
  content: '';
  position: absolute;
  inset: -4px -6px;
  border: 1px solid var(--text);
  opacity: 0;
  pointer-events: none;
}

.contact-block-sidebar.flash::after {
  animation: cBorder .9s ease forwards;
}

.contact-block-sidebar a {
  font-family: 'RetorikaMono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  line-height: 2.2;
  display: block;
  white-space: nowrap;
  text-align: right;
}

.contact-block-sidebar a:hover {
  font-weight: 700;
}


/* ── MAIN COLUMN ─── */
.col-main {
  grid-area: main;
  padding-top: 200px;
  padding-left: 44px;
  padding-right: 44px;
  transition: padding-top 0.5s cubic-bezier(.25, .46, .45, .94),
    padding-left 0.5s cubic-bezier(.25, .46, .45, .94),
    padding-right 0.5s cubic-bezier(.25, .46, .45, .94);
}

body.scrolled .col-main {
  padding-top: 60px;
  padding-left: 0;
  padding-right: 0;
}


/* ── NAV sidebar (vertical) ─── */
#desktopNav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.scrolled #desktopNav {
  opacity: 1;
}

body.scrolled #preScrollNav {
  pointer-events: none;
}

.nav-link.flip-in {
  animation: navFlip 0.5s cubic-bezier(.25, .46, .45, .94) forwards;
}

@keyframes navFlip {
  0% {
    transform: rotateX(-90deg);
    opacity: 0;
  }

  60% {
    transform: rotateX(10deg);
    opacity: 1;
  }

  100% {
    transform: rotateX(0deg);
    opacity: 1;
  }
}




.nav-fly-clone {
  position: fixed;
  font-family: 'RetorikaMono', monospace;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
  transform-origin: top left;
  will-change: left, top;
}







/* ── SHARED WORDMARK CHARS ─── */
.wm-char {
  display: inline-block;
}

.wm-suffix {
  display: inline-block;
  overflow: visible;
  white-space: nowrap;
  vertical-align: baseline;
}

.wm-space {
  display: inline-block;
  overflow: hidden;
}

.wm-c {
  display: inline-block;
  white-space: nowrap;
  transition: none;
}


/* ── NAV shared ─── */
nav {
  transform-style: preserve-3d;
}

.nav-link {
  font-family: 'RetorikaMono', monospace;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  position: relative;
}

.nav-link::before {
  content: attr(data-text);
  display: block;
  font-weight: 700;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.nav-link::after {
  display: none;
}

.nav-link:hover,
.nav-link.active {
  font-weight: 700;
  font-size: 11px;
}


/* ── CONTACT BLOCK (pre-scroll) ─── */
.contact-block {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  width: fit-content;
  /* no transform, no opacity transition */
}

.contact-block::after {
  content: '';
  position: absolute;
  inset: -4px -6px;
  border: 1px solid var(--text);
  opacity: 0;
  pointer-events: none;
}

.contact-block.flash::after {
  animation: cBorder .9s ease forwards;
}

@keyframes cBorder {
  0% {
    opacity: 0;
  }

  12% {
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.contact-block a {
  font-family: 'RetorikaMono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  line-height: 2.2;
  display: block;
  white-space: nowrap;
  text-align: right;
}

.contact-block a:hover {
  font-weight: 700;
}


/* ── WM FLY CLONE ─── */
/* Same pattern as .flip-clone */
.wm-fly-clone {
  position: fixed;
  font-family: 'Chillax', sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  pointer-events: none;
  z-index: 300;
  transform-origin: top left;
  white-space: nowrap;
  will-change: transform, font-size, left, top;
}


/* ── MAIN CONTENT ─── */
.content-wrap {
  max-width: 1050px;
  margin: 0 auto;
}

#projects {
  padding-bottom: 72px;
}

.section-label {
  font-family: 'RetorikaMono', monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 28px;
}

.rule {
  height: 1px;
  background: var(--border);
  margin: 0 0 64px;
}


/* ── PROJECT GRID ─── */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.project-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.card-img-wrap {
  overflow: hidden;
  border-radius: 7px;
}

.card-img-wrap img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.65s cubic-bezier(.25, .46, .45, .94);
}

.project-card:hover .card-img-wrap img,
.project-card:hover .img-ph {
  transform: scale(1.04);
}

.img-ph {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Chillax', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(15, 15, 14, .16);
  text-transform: uppercase;
  transition: transform 0.65s cubic-bezier(.25, .46, .45, .94);
}

.ph-ar {
  background: linear-gradient(150deg, #bedad0, #9ecfc0);
}

.ph-os {
  background: linear-gradient(150deg, #ddd9d2, #c8c4bb);
}

.ph-2g {
  background: linear-gradient(150deg, #bfcfe8, #a8bedd);
}

.ph-aq {
  background: linear-gradient(150deg, #b8dde4, #98ced8);
}

.ph-heli {
  background: linear-gradient(150deg, #cbc7bf, #b8b4aa);
}

.ph-hall {
  background: linear-gradient(150deg, #becdd8, #a8bcc8);
}

.ph-screen {
  background: linear-gradient(150deg, #dbd7cf, #c8c4bb);
}

.card-info {
  padding: 14px 2px 8px;
}

.card-title {
  font-family: 'Chillax', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
  transition: opacity .2s;
}

.project-card:hover .card-title {
  opacity: 0.6;
}

.card-sub {
  font-family: 'RetorikaMono', monospace;
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
}


/* ── ABOUT ─── */
#about {
  padding-bottom: 96px;
}

.about-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 80px;
  align-items: start;
}

.about-left {
  position: sticky;
  top: 30px;
  align-self: start;
}

.about-label {
  font-family: 'RetorikaMono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
}

.about-heading {
  font-family: 'Chillax', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: 24px;
}

.about-heading span {
  display: block;
  transition: opacity 0.2s;
}

.about-heading.flip-active span {
  opacity: 0;
}

.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  background: #D4D0C8;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text p {
  font-family: 'RetorikaMono', monospace;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.84;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: 0.04ch;
}

.about-text p:last-child {
  margin-bottom: 0;
}


/* ── EXPERIENCE ─── */
.exp-block {
  margin-top: 52px;
}

.exp-label {
  font-family: 'RetorikaMono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.exp-row {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.exp-years {
  font-family: 'RetorikaMono', monospace;
  font-size: 10px;
  font-weight: 400;
  color: var(--text);
  padding-top: 1px;
}

.exp-org {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.exp-role {
  font-family: 'RetorikaMono', monospace;
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 4px;
}

.exp-detail {
  font-family: 'RetorikaMono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.7;
  letter-spacing: 0.02ch;
}


/* ── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer>span {
  font-family: 'Agave', monospace;
  font-size: 10px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.05em;
}

.footer-wm {
  font-family: 'Chillax', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.fw-word {
  display: inline-flex;
  align-items: baseline;
}

.fw-anchor {
  display: inline-block;
}

.fw-suffix {
  display: inline-flex;
  overflow: hidden;
  white-space: nowrap;
  align-items: baseline;
  transition: width 0.15s ease;
}

.fw-c {
  display: inline-block;
  transition: none;
}

.fw-sp {
  display: inline-block;
  overflow: hidden;
  transition: width 0.15s ease;
}


/* ── FLIP CLONES (about heading) ─── */
.flip-clone {
  position: fixed;
  font-family: 'Chillax', sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  pointer-events: none;
  z-index: 200;
  transform-origin: top left;
  will-change: transform, font-size;
}


/* ── MOBILE HEADER ─── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  padding: 0 20px;
  background: var(--bg);
  z-index: 100;
  align-items: center;
  justify-content: space-between;
}

.mobile-wm {
  font-family: 'Chillax', sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.04em;
  user-select: none;
}

#mobileInlineNav {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

#mobileInlineNav .nav-link {
  font-size: 9px;
  letter-spacing: 0.1em;
}

.mobile-contact {
  display: none;
}


/* ══════════════════════════════════════════════
   MOBILE  ≤ 700px
   ══════════════════════════════════════════════ */

@media (max-width: 700px) {
  .pre-scroll-bar {
    display: none;
  }

  .page-grid {
    display: block;
  }

  .col-left,
  .col-right {
    display: none;
  }

  body.scrolled .page-grid {
    display: block;
  }

  body.scrolled .col-left,
  body.scrolled .col-right {
    display: none;
  }

  .mobile-header {
    display: flex;
  }

  .col-main,
  body.scrolled .col-main {
    padding: 68px 20px 0;
    transition: none;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .exp-row {
    grid-template-columns: 80px 1fr;
    gap: 12px;
  }


  .about-left {
    position: static;
  }



  .mobile-contact {
    display: block;
    padding: 48px 20px 64px;
    border-top: 1px solid var(--border);
  }

  .mobile-contact-label {
    font-family: 'RetorikaMono', monospace;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 20px;
  }

  .mobile-contact-links {
    display: flex;
    flex-direction: column;
  }

  .mobile-contact-links a {
    font-family: 'RetorikaMono', monospace;
    font-size: 12px;
    font-weight: 400;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.02em;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-contact-links a:first-child {
    border-top: 1px solid var(--border);
  }

  .mobile-contact-links a:hover {
    font-weight: 700;
  }

  .mobile-contact-links a span {
    font-size: 16px;
    opacity: 0.3;
  }

  footer {
    padding: 20px;
  }

  footer>span:last-child {
    display: none;
  }
}