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

:root {
  --bg: #f4f4f4;
  --ink: #000000;
  --muted: #454545;
  --cyan:    #00AEEF;
  --magenta: #EC008C;
  --yellow:  #FFF200;
  --font: 'Courier Prime', 'Courier New', monospace;
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 12vw, 10rem);
  max-width: 100%;
  min-width: 320px;
}

.sub-page {
  justify-content: flex-start;
  padding-top: clamp(4rem, 12vw, 8rem);
}

.title-group {
  margin-bottom: 3rem; 
}

h1 {
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 0.5rem; 
}

.title-group .subtitle {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0; 
  margin-left: 0.2rem; 

  position: relative;
  padding: 0.2rem 0.6rem;
  width: max-content;
}

.title-group .subtitle::before,
.title-group .subtitle::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  border: 1px solid currentColor;
}

.title-group .subtitle::before {
  left: 0;
  border-right: none;
}

.title-group .subtitle::after {
  right: 0;
  border-left: none;
}


nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem; 
  flex-grow: 1;
  width: 100%; 
}

nav a {
  display: flex;
  align-items: flex-end; 
  width: 100%;
  color: var(--ink);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-decoration: none; 
  cursor: crosshair;
  position: relative;
  transition: opacity 0.12s ease;
}

nav a span {
  display: block;
  padding-bottom: 4px; 
  border-bottom: 4px solid; 
}

nav a::after {
  content: '';
  flex-grow: 1;  
  height: 1px;
}

nav a::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 0; 
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:hover::before,
nav a:focus-visible::before {
  width: 100%; 
}

nav a:nth-child(1) span { border-bottom-color: var(--cyan); }
nav a:nth-child(1)::after, nav a:nth-child(1)::before { background-color: var(--cyan); }

nav a:nth-child(2) span { border-bottom-color: var(--magenta); }
nav a:nth-child(2)::after, nav a:nth-child(2)::before { background-color: var(--magenta); }

nav a:nth-child(3) span { border-bottom-color: var(--yellow); }
nav a:nth-child(3)::after, nav a:nth-child(3)::before { background-color: var(--yellow); }

nav a:nth-child(4) span { border-bottom-color: var(--ink); }
nav a:nth-child(4)::after, nav a:nth-child(4)::before { background-color: var(--ink); }

nav a:nth-child(5) span { border-bottom-color: var(--cyan); }
nav a:nth-child(5)::after, nav a:nth-child(5)::before { background-color: var(--cyan); }

nav a:hover,
nav a:focus-visible {
  opacity: 0.45;
  outline: none;
}

nav a:focus-visible {
  outline: 1.5px dashed rgba(0,0,0,0.3);
  outline-offset: 6px;
}

.bottom-layout {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
}

/* subpages */
.sub-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 4rem;
}

.sub-header nav {
  max-width: 800px;
}

.sub-content {
  line-height: 1.6;
  max-width: 800px;
}

.sub-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 0.25rem;
}

.sub-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.25rem;
}

.sub-content p {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.sub-content ul {
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.sub-content li {
  margin-bottom: 0.5rem;
}

.sub-content a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: opacity 0.2s ease;
}

.sub-content a:hover {
  opacity: 0.5;
}


/* vector graphic */
.vector-matrix {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.4rem;
  font-size: 0.55rem;
  line-height: 1;
  letter-spacing: 0.05em;
  color: rgba(0, 0, 0, 0.4);
  width: max-content; 
  cursor: crosshair;
  transition: color 0.2s ease;
}

.vector-matrix:hover {
  color: var(--ink);
}

.vector-matrix::before,
.vector-matrix::after {
  content: '';
  position: absolute;
  top: -0.2rem;
  bottom: -0.2rem;
  width: 3px;
  border: 1px solid currentColor;
}

.vector-matrix::before {
  left: 0;
  border-right: none;
}

.vector-matrix::after {
  right: 0;
  border-left: none;
}

.vector-matrix .dots {
  letter-spacing: 0.15em;
  opacity: 0.7;
}


/* print marks */

.proof-marks {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}

.crop-mark {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(0, 0, 0, 0.18);
  border-style: solid;
}
.crop-mark.tl { top: 1.25rem;    left: 1.25rem;  border-width: 1px 0 0 1px; }
.crop-mark.tr { top: 1.25rem;    right: 1.25rem; border-width: 1px 1px 0 0; }
.crop-mark.bl { bottom: 1.25rem; left: 1.25rem;  border-width: 0 0 1px 1px; }
.crop-mark.br { bottom: 1.25rem; right: 1.25rem; border-width: 0 1px 1px 0; }

.proof-badge {
  position: absolute;
  bottom: 1.1rem;
  right: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.reg-cross {
  position: relative;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 50%;
}
.reg-cross::before,
.reg-cross::after {
  content: '';
  position: absolute;
  background: rgba(0, 0, 0, 0.22);
}
.reg-cross::before {
  top: 50%; left: -35%;
  width: 170%; height: 1px;
  transform: translateY(-50%);
}
.reg-cross::after {
  left: 50%; top: -35%;
  height: 170%; width: 1px;
  transform: translateX(-50%);
}

.cmyk-dots {
  display: flex;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-left: -4px;
  mix-blend-mode: multiply;
}

.dot:first-child { margin-left: 0; }
.dot.c { background: var(--cyan); }
.dot.m { background: var(--magenta); }
.dot.y { background: var(--yellow); }
.dot.k { background: var(--ink); }


.contact-line {
  margin-top: 2rem;
  font-size: 0.85rem;
}

.contact-line a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.contact-line a:hover {
  opacity: 0.5;
}

.project-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.project-layout .project-gif {
  flex: 0 0 260px;
  max-width: 260px;
  width: 100%;
  height: auto;
  display: block;
}
.project-layout .project-text {
  flex: 1;
  min-width: 280px;
}
@media (max-width: 600px) {
  .project-layout .project-gif { flex-basis: 100%; max-width: 320px; }
}