/* RenaHub portfolio: native CSS, product-gallery aesthetic.
   Design variance 7 / motion intensity 4 / visual density 3.
   Media uses 20px corners; app icons and the website frame keep their own proportions. */
:root {
  color-scheme: light dark;
  --background: #f5f6f8;
  --foreground: #17191e;
  --muted: #626771;
  --line: rgb(23 25 30 / 12%);
  --accent: #315dca;
  --imaano-surface: #e3e5eb;
  --bumpy-surface: #f0e6e4;
  --screen-edge: #292c36;
  --screen-shadow: rgb(22 26 41 / 26%);
  --radius-media: 20px;
  --gutter: clamp(1.5rem, 5vw, 6rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { min-width: 320px; }

body {
  min-height: 100dvh;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #f5f6f8; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 7px; border-radius: 4px; }
img { display: block; max-width: 100%; }

.skip-link {
  position: fixed;
  top: 1rem;
  left: var(--gutter);
  z-index: 1;
  padding: 0.75rem 1rem;
  background: var(--foreground);
  color: var(--background);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.page-shell {
  width: min(100% - var(--gutter) * 2, 85rem);
  margin-inline: auto;
  padding-top: clamp(3rem, 5.5vw, 6rem);
  padding-bottom: 2rem;
}

.identity h1 {
  margin: 0;
  font-size: clamp(4.5rem, 8.8vw, 8rem);
  font-weight: 600;
  letter-spacing: -0.075em;
  line-height: 0.95;
}
.identity h1::after {
  display: block;
  width: 3rem;
  height: 4px;
  margin-top: 1.75rem;
  background: var(--accent);
  content: "";
  transform-origin: left;
}
.identity > p {
  max-width: 29rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  letter-spacing: -0.025em;
  line-height: 1.55;
}

.work { margin-top: clamp(3.25rem, 5.5vw, 5rem); }
.work > h2 {
  margin: 0 0 1.5rem;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.045em;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}
.project { display: block; min-width: 0; }
.project:focus-visible { border-radius: var(--radius-media); }

/* Only the visual is framed; the project text belongs to the page. */
.project-visual {
  position: relative;
  aspect-ratio: 1.12;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius-media);
}
.project-visual::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgb(23 25 30 / 6%);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}
.imaano-visual { background: var(--imaano-surface); }
.imaano-screen {
  position: absolute;
  width: 47%;
  max-width: none;
  height: auto;
  border: 3px solid var(--screen-edge);
  border-radius: clamp(14px, 2vw, 26px);
  box-shadow: 0 22px 35px var(--screen-shadow);
}
.imaano-screen-back { top: 12%; left: 9%; transform: rotate(-12deg); }
.imaano-screen-front { top: 21%; right: 10%; transform: rotate(9deg); }
.bumpy-visual { display: grid; place-items: center; background: var(--bumpy-surface); }
.bumpy-icon {
  width: 54%;
  height: auto;
  border-radius: 23%;
  box-shadow: 0 18px 35px var(--screen-shadow);
}
.rena-visual { display: grid; place-items: center; background: var(--imaano-surface); }
.website-preview {
  width: 88%;
  overflow: hidden;
  border: 1px solid rgb(23 25 30 / 12%);
  border-radius: 12px;
  background: #f5f6f8;
  box-shadow: 0 18px 35px var(--screen-shadow);
}
.website-toolbar {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid rgb(23 25 30 / 8%);
  color: #626771;
  font-size: 0.65rem;
  line-height: 1;
}
.rena-website { width: 100%; height: auto; }

.project-details { padding: 1.35rem 0.2rem 0; }
.project-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.project-heading h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2.15vw, 1.85rem);
  font-weight: 550;
  letter-spacing: -0.05em;
  line-height: 1.2;
}
.project-arrow {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  place-items: center;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
}
.project-details > p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  letter-spacing: -0.015em;
  line-height: 1.5;
}
.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}
.project-action { color: var(--foreground); font-weight: 500; white-space: nowrap; }
.project:is(:hover, :focus-visible) .project-arrow,
.project:is(:hover, :focus-visible) .project-action { color: var(--accent); }

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(3.25rem, 5vw, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: -0.01em;
  line-height: 1.5;
}
.page-footer a { display: inline-flex; align-items: center; gap: 0.6rem; }
.page-footer a:is(:hover, :focus-visible) { color: var(--foreground); }

@media (prefers-color-scheme: dark) {
  :root {
    --background: #101216;
    --foreground: #f0f1f3;
    --muted: #a0a5af;
    --line: rgb(240 241 243 / 12%);
    --accent: #82a5f5;
    --imaano-surface: #20232b;
    --bumpy-surface: #2b2426;
    --screen-edge: #41434e;
    --screen-shadow: rgb(8 10 16 / 45%);
  }
  .project-visual::after { border-color: rgb(240 241 243 / 8%); }
}

@media (max-width: 767px) {
  .page-shell { padding-top: 3.5rem; }
  .identity h1 { font-size: clamp(3.75rem, 15vw, 6.5rem); }
  .identity > p { max-width: 25rem; }
  .work { margin-top: 3.25rem; }
  .project-grid { grid-template-columns: 1fr; gap: 2.75rem; }
  .project-visual { aspect-ratio: 1.18; }
  .imaano-screen { border-radius: clamp(18px, 5vw, 32px); }
  .project-details { padding-top: 1.1rem; }
  .project-heading h3 { font-size: 1.7rem; }
  .project-details > p { font-size: 0.95rem; }
  .project-meta { margin-top: 1rem; }
  .page-footer { margin-top: 3.25rem; font-size: 0.75rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .identity,
  .work > h2,
  .project { animation: enter 800ms var(--ease) both; }
  .work > h2 { animation-delay: 80ms; }
  .project:nth-child(1) { animation-delay: 120ms; }
  .project:nth-child(2) { animation-delay: 190ms; }
  .project:nth-child(3) { animation-delay: 260ms; }
  .project-visual,
  .imaano-screen,
  .bumpy-icon,
  .website-preview,
  .project-arrow { transition: transform 650ms var(--ease); }
  .project:focus-visible .project-visual { transform: translateY(-4px); }
  .project:focus-visible .project-arrow { transform: translate(2px, -2px); }

  @media (hover: hover) and (pointer: fine) {
    .project:hover .project-visual { transform: translateY(-4px); }
    .project:hover .project-arrow { transform: translate(2px, -2px); }
    .project:is(:hover, :focus-visible) .imaano-screen-back { transform: translate(-3px, -5px) rotate(-14deg); }
    .project:is(:hover, :focus-visible) .imaano-screen-front { transform: translate(3px, -8px) rotate(7deg); }
    .project:is(:hover, :focus-visible) .bumpy-icon { transform: translateY(-3px) scale(1.035); }
    .project:is(:hover, :focus-visible) .website-preview { transform: translateY(-3px) scale(1.025); }
  }
}

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