:root {
  --bg: #05060a;
  --ink: #eef1f7;
  --dim: #6f7690;
  --faint: #2b3040;
  --line: rgba(180, 200, 255, 0.06);
  --accent: #c9d3e8;
  --navy: #0f1a3a;
  --navy-deep: #060915;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  position: relative;
  font-feature-settings: "ss01", "cv11";
}

/* --- Backdrop: precise dot grid + soft top light --- */

.grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--bg);
  background-image: radial-gradient(
    circle at 1px 1px,
    rgba(180, 200, 255, 0.05) 1px,
    transparent 0
  );
  background-size: 28px 28px;
  mask-image: radial-gradient(
    ellipse at 50% 40%,
    black 40%,
    transparent 85%
  );
  -webkit-mask-image: radial-gradient(
    ellipse at 50% 40%,
    black 40%,
    transparent 85%
  );
}

.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      ellipse 70vmax 55vmax at 15% 20%,
      rgba(30, 55, 130, 0.35) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 60vmax 45vmax at 85% 90%,
      rgba(20, 40, 100, 0.28) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 90vmax 60vmax at 50% 120%,
      rgba(10, 20, 60, 0.5) 0%,
      transparent 65%
    );
  pointer-events: none;
}

/* --- Layout --- */

main {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 96px 8vw;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Small pre-title mark --- */

.mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 40px;
  animation: fade 0.9s ease-out 0.1s both;
}

.mark-tick {
  width: 22px;
  height: 1px;
  background: var(--accent);
}

/* --- Wordmark --- */

h1 {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 7rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--ink);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.02),
    0 20px 60px rgba(30, 60, 140, 0.35),
    0 40px 120px rgba(15, 30, 90, 0.4);
}

h1 .line {
  display: block;
  animation: rise 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

h1 .line:nth-child(2) {
  animation-delay: 0.12s;
}

h1 .dim {
  color: var(--dim);
}

h1 em {
  font-style: normal;
  font-weight: 400;
  color: var(--faint);
  margin-left: 0.05em;
}

/* --- Portfolio --- */

.portfolio {
  margin-top: 72px;
  max-width: 560px;
  width: 100%;
  animation: rise 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.portfolio-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 20px;
}

.portfolio-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.portfolio-list li {
  border-bottom: 1px solid var(--line);
}

.portfolio-list a {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 20px;
  padding: 20px 4px;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.25s ease, padding 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.25s ease;
  position: relative;
}

.portfolio-list a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(30, 60, 140, 0.12),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.portfolio-list a:hover {
  padding-left: 12px;
  padding-right: 0;
}

.portfolio-list a:hover::before {
  opacity: 1;
}

.co-name {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.co-name em {
  font-style: normal;
  font-weight: 400;
  color: var(--dim);
  margin-left: 0.15em;
}

.co-domain {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.02em;
}

.co-arrow {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--dim);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
}

.portfolio-list a:hover .co-arrow {
  color: var(--ink);
  transform: translateX(4px);
}

/* --- Postal --- */

.postal {
  margin-top: 56px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  animation: fade 1s ease-out 0.45s both;
}

.postal-sep {
  color: var(--faint);
}

/* --- Motion --- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Responsive --- */

@media (max-width: 640px) {
  main {
    padding: 96px 24px;
  }
  .portfolio {
    margin-top: 56px;
  }
  .portfolio-list a {
    grid-template-columns: 1fr auto;
    gap: 4px 16px;
  }
  .co-domain {
    grid-column: 1;
    font-size: 11px;
  }
  .co-arrow {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
  }
  .postal {
    margin-top: 40px;
    font-size: 10px;
    letter-spacing: 0.1em;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  h1 .line,
  .mark {
    animation: none !important;
  }
}
