@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Manrope:wght@200..800&family=Nixie+One&family=Tiro+Kannada:ital@0;1&display=swap');
:root {
  --paper: #ffffff;
  --ink: #17160fdd;
  --line: #ff4040;
  --accent: #ff4040;
  --max-width: 100%;
  --header-h: 100px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a:hover,
a:focus-visible {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--paper);
  border-bottom: 0px solid var(--line);
}

.site-header .header-inner {
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: visible;
}

.wordmark {
  font-family: 'Inter', Georgia, serif;
  font-weight: 800;
  font-style: italic;
  font-size: clamp(20px, 5vw, 1800px);
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark:hover { color: var(--accent); }

.wordmark {
  transition: text-shadow 0.05s;
}

.wordmark:hover {
  animation: flicker 2s infinite;
}

@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow: color(0 20 110 240);
  }
  20%, 22%, 24%, 55% {
    text-shadow: 8px 8px 14px rgba(0, 0, 0, 0.99);
  }
}

.back-link {
  font-family: 'Inter', monospace;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
}

.back-link:hover { color: var(--accent); }

/* main layout */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 15px 24px 50px;
}

.bio {
  margin: 0 0 20px;
  font-size: larger;
  font-weight: 500;
  margin-left: -24px;
  margin-right: -24px;
  padding: 24px;
}

.bio:hover,
.bio:focus-within {
  background: var(--accent);
}

.bio:hover p,
.bio:focus-within p {
  color: #ffffff
}

.bio p { margin: 0 0 16px; }
.bio p:last-child { margin-bottom: 0; }

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  color: #ff4040;
  margin: 0 0 12px;
  border-top: 1px transparent var(--line);
  margin-top: 32px;
  padding-top: 16px;
}

/* project index list */

.project-list {
  list-style: none;
  margin-left: -24px;
  margin-right: -24px;
  padding: 0;
}

.project-list li {
  border-bottom: 1px solid var(--line);
  padding-left: 24px;
  padding-right: 24px;
}

.project-list li:first-child {
  border-top: 1px solid var(--line);
}

.project-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  text-decoration: none;
  color: var(--ink);
}

.project-link .title {
  font-family: 'Inter', Georgia, serif;
  font-weight: 500;
  font-size: 19px;
}

.title-sub {font-weight: 300;}

.project-link .meta {
  font-family: 'Inter', monospace;
  font-size: 13px;
  font-weight: 300;
  color: #6b6656;
  white-space: nowrap;
}

.project-list li:hover,
.project-list li:focus-within {
  background: var(--accent);
}

.project-link {
  width: 100%;
}

.project-list li:hover .title,
.project-list li:hover .meta,
.project-list li:focus-within .title,
.project-list li:focus-within .meta {
  color: #ffffff;
}

/* hover preview thumbnail */

.hover-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -120%);
  transition: opacity 0.15s ease;
  z-index: 30;
  border: 1px solid var(--line);
  background: var(--paper);
  max-width: 280px;
  max-height: 280px;
}

.hover-preview.visible { opacity: 1; }

.hover-preview img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* project detail page */

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-left: -24px;
  margin-right: -24px;
  padding: 24px;
}

.project-header:hover,
.project-header:focus-within {
  background: var(--accent);
}

.project-header:hover h1,
.project-header:hover .meta,
.project-header:focus-within h1,
.project-header:focus-within .meta {
  color: #ffffff;
}

.project-header h1 {
  font-family: 'Inter', Georgia, serif;
  font-weight: 600;
  font-size: 32px;
  margin: 0 0 6px;
}

.project-header .meta {
  white-space: nowrap;
  margin-left: 16px;
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 200;
  color: #17160fdd;
}

.title-sub-h1 {
  font-weight: 200;
}

.project-description {
  margin: 0 0 40px;
  margin-left: -24px;
  margin-right: -24px;
  padding: 24px;
}

.project-description:hover,
.project-description:focus-within {
  background: var(--accent);
}

.project-description:hover p,
.project-description:focus-within p {
  color: #ffffff;
}

.project-description p { margin: 0 0 16px; }
.project-description p:last-child { margin-bottom: 0; }

.project-images {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-images figure {
  margin: 0;
}

.project-images img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
}

.img-small { max-width: 300px; }
.img-medium { max-width: 500px; }
.img-large { max-width: 900px; }

.project-images figcaption {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 200;
  color: #6b6656;
  margin-top: 8px;
}

footer.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 30px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #6b6656;
}

footer.site-footer a { color: #6b6656; }
footer.site-footer a:hover { color: var(--accent); }

.footer-large {
  font-size: 20px;
}

#contact-bubble {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 40;
  overflow: hidden;
  user-select: none;
}

#contact-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: spin 6s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#contact-bubble:active {
  cursor: grabbing;
}

@media (max-width: 480px) {
  body { font-size: 17px; }
  .project-link .title { font-size: 18px; }
}
