:root {
  --bg: #0c0c0b;
  --fg: #d6d6d6;
  --fg-mid: #888;
  --fg-dim: #555;
  --accent: #EAD006;
  --rule: #1e1e1e;
}

* {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: "Space Mono", monospace;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Noise grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

a {
  color: var(--fg);
  text-decoration: none;
}

.page {
  width: min(680px, calc(100% - 48px));
  margin: 0 auto;
  padding: 12vh 0 10vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Fade in ---- */

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.identity,
.work,
.contact {
  animation: enter 0.6s ease both;
}

.work {
  animation-delay: 0.1s;
}

.contact {
  animation-delay: 0.2s;
}

/* ---- Identity ---- */

.identity {
  margin-bottom: 10vh;
}

.logo {
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  min-height: 1.2em;
}

.logo-yellow {
  color: #EAD006;
}

.logo-green {
  color: #22D68A;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.logo-cursor {
  color: var(--fg);
  animation: blink 0.8s step-end infinite;
}

.identity p {
  margin-top: 12px;
  color: var(--fg-mid);
}

/* ---- Work ---- */

.work {
  flex: 1;
}

@keyframes flow {
  from { background-position: 0 bottom; }
  to { background-position: 6px bottom; }
}

.project-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 18px 0;
  cursor: pointer;
}

.project-name {
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  color: var(--fg);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  white-space: nowrap;
}

.project.open .project-name {
  color: var(--accent);
}

@media (hover: hover) {
  .project-row:hover .project-name {
    color: var(--accent);
  }
}

.leader {
  flex: 1;
  height: 1px;
  margin-bottom: 4px;
  background-image: linear-gradient(to right, var(--fg-dim) 1px, transparent 1px);
  background-size: 6px 1px;
  background-repeat: repeat-x;
  background-position: 0 bottom;
  animation: flow 0.3s linear infinite;
  transition: filter 0.3s ease;
  filter: drop-shadow(0 0 0 transparent);
}

.project.open .leader {
  background-image: linear-gradient(to right, var(--accent) 1px, transparent 1px);
  animation: flow 0.12s linear infinite;
  filter: drop-shadow(0 0 4px var(--accent)) drop-shadow(0 0 8px rgba(255, 225, 77, 0.3));
}

@media (hover: hover) {
  .project-row:hover .leader {
    background-image: linear-gradient(to right, var(--accent) 1px, transparent 1px);
    animation: flow 0.12s linear infinite;
    filter: drop-shadow(0 0 4px var(--accent)) drop-shadow(0 0 8px rgba(255, 225, 77, 0.3));
  }
}

.tag {
  color: var(--fg-dim);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.project.open .tag {
  color: var(--fg-mid);
}

@media (hover: hover) {
  .project-row:hover .tag {
    color: var(--fg-mid);
  }
}

.project-detail {
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease;
}

.project-detail p {
  color: var(--fg-mid);
  font-size: 13px;
  padding: 0 0 8px;
}

.project-link {
  display: inline-block;
  color: #22D68A;
  font-size: 13px;
  font-weight: 700;
  padding-bottom: 16px;
  position: relative;
}

.project-link::after {
  content: "";
  position: absolute;
  bottom: 12px;
  left: 0;
  width: 0;
  height: 1px;
  background: #22D68A;
  transition: width 0.25s ease;
}

.project-link:hover::after {
  width: 100%;
}

.show-more {
  font-family: inherit;
  font-size: 13px;
  color: var(--fg-dim);
  background: none;
  border: none;
  padding: 18px 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.show-more:hover {
  color: #22D68A;
}

/* ---- Contact ---- */

.contact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 10vh;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.contact-links {
  display: flex;
  gap: 28px;
}

.contact a {
  color: var(--fg-mid);
  font-size: 14px;
  position: relative;
  transition: color 0.2s ease;
}

.contact a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: #22D68A;
  transition: width 0.25s ease;
}

.contact a:hover {
  color: #22D68A;
}

.contact a:hover::after {
  width: 100%;
}

.colophon {
  color: var(--fg-dim);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---- Responsive ---- */

@media (max-width: 600px) {
  .page {
    width: calc(100% - 32px);
    padding: 14vh 0 8vh;
  }

  .identity {
    margin-bottom: 8vh;
  }



  .contact {
    margin-top: 8vh;
  }
}
