/* SunStudio — one screen, real project shots */
:root {
  --bg: #090C11;
  --ink: #F5F7FA;
  --muted: #A4AEBC;
  --gold: #E3B24A;
  --line: rgba(255,255,255,0.14);
  --font: "Pretendard Variable", Pretendard, -apple-system, sans-serif;
  --display: "Bricolage Grotesque", "Pretendard Variable", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --vh: 100vh;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.noise {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% -10%, rgba(70, 95, 140, 0.35), transparent 60%),
    radial-gradient(ellipse 40% 30% at 90% 80%, rgba(180, 120, 40, 0.1), transparent 50%),
    #090C11;
}

.shell {
  position: relative;
  z-index: 1;
  height: var(--vh);
  max-height: var(--vh);
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 14px 16px 16px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mark {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #FFE8A8, var(--gold) 55%, #8A5808);
  box-shadow: 0 0 0 3px rgba(227,178,74,0.18);
}

.brand h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  background: linear-gradient(105deg, #fff 15%, #F3D48A 60%, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.brand p {
  font-size: clamp(0.78rem, 1.2vw, 0.92rem);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.domain {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  flex-shrink: 0;
}

/* 5 equal cards — always all visible */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  min-height: 0;
  height: 100%;
}

.item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #12161e;
  min-height: 0;
  isolation: isolate;
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
}

.item:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(255,255,255,0.32);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  z-index: 2;
}

.item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.55s var(--ease), filter 0.35s;
}

.item:hover img {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.05) 20%, rgba(0,0,0,0.55) 62%, rgba(0,0,0,0.88) 100%);
  z-index: 1;
}

.info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 14px 12px 12px;
}

.n {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 4px;
}

.info h2 {
  font-family: var(--display);
  font-weight: 750;
  font-size: clamp(0.95rem, 1.35vw, 1.2rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 3px;
}

.info p {
  font-size: clamp(0.68rem, 0.95vw, 0.78rem);
  color: rgba(245,247,250,0.72);
  line-height: 1.3;
}

/* Wide but short screens */
@media (max-height: 700px) {
  .shell { padding: 10px 12px 12px; gap: 8px; }
  .head { padding: 8px 12px; }
  .info { padding: 10px 10px 10px; }
  .info p { display: none; }
}

/* Tablet: 3 + 2 still all on one screen if tall enough; allow scroll only when needed */
@media (max-width: 980px) {
  html, body { overflow: auto; }
  .shell {
    height: auto;
    min-height: var(--vh);
    max-height: none;
  }
  .grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(220px, 28vh);
    height: auto;
  }
  .item:nth-child(4),
  .item:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: minmax(180px, 24vh);
  }
  .item:last-child {
    grid-column: 1 / -1;
  }
  .brand p { display: none; }
  .domain { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .item, .item img { transition: none; }
}
