/* himmetaga — studio site */

@font-face { font-family: "Geist"; src: url("../fonts/Geist-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url("../fonts/Geist-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; font-style: italic; src: url("../fonts/Geist-latin-italic.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+2000-206F; }
@font-face { font-family: "Geist"; font-style: italic; src: url("../fonts/Geist-latin-ext-italic.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1E9F; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/GeistMono-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0a0a0c;
  --bg-2: #111115;
  --line: rgba(240, 238, 232, 0.1);
  --line-2: rgba(240, 238, 232, 0.18);
  --tx: #f0eee8;
  --mut: rgba(240, 238, 232, 0.6);
  --faint: rgba(240, 238, 232, 0.4);
  --ac: #ff6b3d;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--tx);
  font-family: var(--sans); font-size: clamp(15px, 0.9rem + 0.15vw, 16.5px); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--tx); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 20; height: 60px;
  display: flex; align-items: center;
  transition: background-color .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.solid { background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav .brand svg { height: 15px; width: auto; color: var(--tx); }
.nav .links { display: flex; align-items: center; gap: 4px; }
.nav .links a { font-size: 14px; color: var(--mut); padding: 8px 12px; border-radius: 999px; transition: color .2s; }
.nav .links a:hover { color: var(--tx); }
.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; margin-left: 8px; }
.lang button, .lang a { font: 500 12px/1 var(--mono); letter-spacing: .06em; color: var(--mut); background: none; border: 0; cursor: pointer; padding: 7px 10px; border-radius: 999px; min-height: 30px; }
.lang [aria-pressed="true"], .lang [aria-current="true"] { background: var(--tx); color: var(--bg); }
@media (max-width: 680px) { .nav .links a.hide-sm { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: 96px 0 56px; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 2s ease .3s; }
.ready .hero canvas { opacity: 1; }
.hero .wrap { position: relative; width: 100%; }
.hero-copy { max-width: 620px; }
.hero h1 { margin: 0; font-size: clamp(34px, 4vw, 56px); line-height: 1.05; letter-spacing: -0.04em; font-weight: 550; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--ac); }
.hero-sub { margin: 18px 0 0; color: var(--mut); font-size: clamp(15.5px, 1.1vw, 17.5px); max-width: 40ch; }
.hero .ctas { margin-top: 28px; }
.hero .rise { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.ready .hero .rise { opacity: 1; transform: none; }
.ready .hero .rise.d1 { transition-delay: .15s; } .ready .hero .rise.d2 { transition-delay: .3s; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 999px; font-weight: 500; font-size: 14px; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s, color .25s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--tx); color: var(--bg); }
.btn.ghost { border: 1px solid var(--line-2); }
.btn.ghost:hover { border-color: var(--tx); }
.btn svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }
.ctas { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: clamp(64px, 8vw, 112px) 0; }
.h2 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.035em; line-height: 1.05; font-weight: 550; margin: 0; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Projects ---------- */
.projects-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(24px, 3vw, 40px); }
.filter { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px; }
.filter button { font: 500 13px/1 var(--sans); color: var(--mut); background: none; border: 0; padding: 8px 14px; border-radius: 999px; cursor: pointer; min-height: 34px; }
.filter button[aria-pressed="true"] { background: var(--tx); color: var(--bg); }

.project-list { display: grid; gap: 20px; }
.project {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--bg-2);
  transition: border-color .4s;
}
.project:hover { border-color: var(--line-2); }
.project[hidden] { display: none; }
.project .cover { position: relative; min-height: clamp(220px, 24vw, 340px); overflow: hidden; isolation: isolate; }
.project .cover > * { transition: transform 1.2s var(--ease); }
.project:hover .cover > .art { transform: scale(1.04); }
.project .body { padding: clamp(22px, 2.6vw, 34px); display: flex; flex-direction: column; gap: 12px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font: 500 11px/1 var(--mono); letter-spacing: .04em; padding: 6px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--mut); }
.tag.status { color: var(--ac); border-color: color-mix(in srgb, var(--ac) 45%, transparent); }
.project h3 { margin: 4px 0 0; font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -0.035em; line-height: 1.1; font-weight: 560; }
.project .tagline { margin: 0; font-size: clamp(15.5px, 1.15vw, 17px); line-height: 1.35; letter-spacing: -0.015em; }
.project p.desc { margin: 0; color: var(--mut); max-width: 46ch; font-size: 15px; }
.project .ctas { margin-top: auto; padding-top: 8px; }
.project:nth-child(even) .cover { order: 2; }
@media (max-width: 880px) {
  .project { grid-template-columns: 1fr; }
  .project:nth-child(even) .cover { order: 0; }
  .project .cover { min-height: 220px; }
}

/* project covers: drawn in code, each in its own colour world */
.art { position: absolute; inset: 0; }
.art-godloom { background: radial-gradient(90% 70% at 30% 10%, #1a2850 0%, #0e1428 55%, #090d1c 100%); }
.art-godloom::before {
  content: ""; position: absolute; left: 50%; top: 58%; width: 190%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle at 36% 4%, #4f9ccc 0%, #2a74ad 6%, #18467f 20%, #0b1c3d 46%);
  box-shadow: 0 -6px 24px 2px rgba(255, 196, 130, .75), 0 -30px 90px 20px rgba(110, 160, 240, .28);
}
.art-godloom::after {
  content: ""; position: absolute; left: 18%; top: 50%; width: 180px; height: 180px; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 226, 170, .85), rgba(255, 210, 150, .2) 30%, transparent 65%);
}
.art .stars { position: absolute; inset: 0 0 45% 0; background-image: radial-gradient(1px 1px at 12% 20%, #fff8, transparent), radial-gradient(1px 1px at 32% 60%, #fff6, transparent), radial-gradient(1.2px 1.2px at 58% 28%, #fffa, transparent), radial-gradient(1px 1px at 76% 48%, #fff7, transparent), radial-gradient(1px 1px at 88% 16%, #fff9, transparent), radial-gradient(1px 1px at 44% 10%, #fff6, transparent), radial-gradient(1px 1px at 22% 74%, #fff5, transparent), radial-gradient(1.2px 1.2px at 66% 70%, #fff7, transparent); }
.art .word { position: absolute; left: clamp(24px, 3vw, 40px); top: clamp(22px, 3vw, 36px); font-size: 13px; letter-spacing: .32em; color: rgba(255, 253, 247, .85); font-family: var(--mono); }

.art-purrlyze { background: linear-gradient(160deg, #23302c 0%, #1a2321 60%, #141b19 100%); }
.art-purrlyze .sheet {
  position: absolute; left: 50%; top: 50%; width: min(52%, 220px); aspect-ratio: 3 / 4; border-radius: 18px;
  background: linear-gradient(170deg, #f3ece0, #e6dccb); box-shadow: 0 40px 80px rgba(0, 0, 0, .35);
  transform: translate(-50%, -46%) rotate(-4deg); padding: 18px; color: #2a3430; display: flex; flex-direction: column; gap: 10px;
}
.art-purrlyze .sheet.back { transform: translate(-44%, -52%) rotate(5deg); background: linear-gradient(170deg, #b9cdbf, #a3bcab); box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.art-purrlyze .sheet b { font-size: 16px; letter-spacing: -0.03em; font-weight: 600; }
.art-purrlyze .sheet i { display: block; height: 7px; border-radius: 6px; background: rgba(42, 52, 48, .14); }
.art-purrlyze .sheet i.s { width: 60%; } .art-purrlyze .sheet i.m { width: 82%; }
.art-purrlyze .sheet .chart { margin-top: auto; height: 34%; border-radius: 14px; background: rgba(42, 52, 48, .07); position: relative; overflow: hidden; }
.art-purrlyze .sheet .chart svg { position: absolute; inset: 12% 8%; width: 84%; height: 76%; }

/* ---------- Studio ---------- */
.studio .statement { font-size: clamp(21px, 2.1vw, 30px); line-height: 1.3; letter-spacing: -0.025em; font-weight: 500; margin: 0; max-width: 34ch; }
.studio .statement .w { opacity: .18; transition: opacity .6s var(--ease); }
.studio .statement .w.on { opacity: 1; }
.no-js .studio .statement .w { opacity: 1; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); margin-top: clamp(36px, 4vw, 56px); padding-top: 24px; border-top: 1px solid var(--line); }
.principles h3 { margin: 0 0 6px; font-size: 16px; font-weight: 550; letter-spacing: -0.02em; }
.principles p { margin: 0; color: var(--mut); font-size: 14.5px; }
@media (max-width: 800px) { .principles { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { border-top: 1px solid var(--line); }
.mail { display: inline-block; margin-top: 16px; font-size: clamp(26px, 3.6vw, 48px); letter-spacing: -0.04em; line-height: 1.1; font-weight: 560; word-break: break-word; }
.mail span { color: var(--ac); }
.mail:hover { color: var(--ac); }
.mail:hover span { color: var(--tx); }
.socials { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.socials a { display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; font-size: 14px !important; border: 1px solid var(--line-2); border-radius: 999px; font-size: 15px; transition: border-color .2s, transform .25s var(--ease); }
.socials a:hover { border-color: var(--tx); }
.socials a:active { transform: scale(.97); }
.socials svg { width: 22px; height: 22px; }

/* ---------- Footer ---------- */
.footer { padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 20px; }
.footer a:hover { color: var(--tx); }

/* ---------- Document pages ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 120px var(--gutter) 88px; }
.doc .kicker { font: 500 12px/1 var(--mono); letter-spacing: .08em; color: var(--ac); text-transform: uppercase; }
.doc h1 { font-size: clamp(32px, 3.6vw, 46px); letter-spacing: -0.04em; line-height: 1.05; margin: 18px 0 0; font-weight: 560; }
.doc .lead { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.4; letter-spacing: -0.015em; margin: 24px 0 0; }
.doc h2 { font-size: clamp(20px, 1.6vw, 24px); letter-spacing: -0.025em; margin: 48px 0 0; font-weight: 550; }
.doc h3 { font-size: 18px; letter-spacing: -0.02em; margin: 36px 0 0; font-weight: 550; }
.doc p, .doc li { color: var(--mut); }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc .note { margin-top: 56px; padding: 22px 24px; border: 1px solid var(--line-2); border-radius: 18px; font-size: 15px; }
.doc .note p { margin: 0; }
.doc .back { display: inline-flex; margin-top: 56px; color: var(--mut); }
.doc .back:hover { color: var(--tx); }
.doc .updated { color: var(--faint); font-size: 14px; margin-top: 12px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.feature-grid div { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg-2); }
.feature-grid h3 { margin: 0 0 8px; }
.feature-grid p { margin: 0; font-size: 15px; }
@media (max-width: 680px) { .feature-grid { grid-template-columns: 1fr; } }

.lost { min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: 0 var(--gutter); }
.lost h1 { font-size: clamp(56px, 8vw, 96px); letter-spacing: -0.06em; margin: 0; line-height: 1; font-weight: 560; }
.lost p { color: var(--mut); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Interaction layer ---------- */
.hero canvas { touch-action: pan-y; }
.hero .wrap { z-index: 1; }
.project { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; --px: 0; --py: 0; position: relative; transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s var(--ease), border-color .4s; will-change: transform; }
.project.tilting { transition: transform .08s linear, border-color .4s; }
.project.reveal.in { transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry)); }
.project::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--tx) 9%, transparent), transparent 60%); }
.project:hover::after { opacity: 1; }
.art-godloom::after { transition: transform .6s var(--ease); transform: translate(calc(-50% + var(--px) * 26px), calc(-50% + var(--py) * 18px)); }
.art-godloom::before { transition: transform .8s var(--ease); transform: translate(calc(-50% + var(--px) * -10px), calc(var(--py) * -6px)); }
.art-godloom .stars { transition: transform .8s var(--ease); transform: translate(calc(var(--px) * -6px), calc(var(--py) * -4px)); }
.art-purrlyze .sheet { transition: transform .7s var(--ease); }
.project:hover .art-purrlyze .sheet { transform: translate(calc(-50% + var(--px) * 10px), calc(-48% + var(--py) * 8px)) rotate(-7deg); }
.project:hover .art-purrlyze .sheet.back { transform: translate(calc(-36% + var(--px) * 4px), calc(-54% + var(--py) * 4px)) rotate(9deg); }
.art-purrlyze .chart polyline { stroke-dasharray: 220; stroke-dashoffset: 0; }
.project:hover .art-purrlyze .chart polyline { animation: chart-draw 1.2s var(--ease); }
@keyframes chart-draw { from { stroke-dashoffset: 220; } to { stroke-dashoffset: 0; } }
.magnet { transition: transform .35s var(--ease); }
.filter { position: relative; }
.filter .pill { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: var(--tx); transition: transform .45s var(--ease), width .45s var(--ease); z-index: 0; }
.filter.has-pill button { position: relative; z-index: 1; background: none !important; transition: color .3s; }
.filter.has-pill button[aria-pressed="true"] { color: var(--bg); }
.project.leaving { opacity: 0; transform: scale(.98); }
.project.entering { animation: card-in .6s var(--ease); }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.99); } }
.mail-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.copy { font: 500 12px/1 var(--mono); letter-spacing: .04em; color: var(--mut); background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 9px 12px; cursor: pointer; margin-top: 16px; min-height: 34px; transition: color .2s, border-color .2s; }
.copy:hover { color: var(--tx); border-color: var(--tx); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: var(--tx); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: opacity .3s, transform .4s var(--ease); pointer-events: none; z-index: 40; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.principles > div { position: relative; }
@media (hover: hover) and (min-width: 801px) {
  .principles > div::before { content: ""; position: absolute; inset: -16px; border-radius: 16px; background: var(--bg-2); opacity: 0; transition: opacity .3s; z-index: -1; }
  .principles > div:hover::before { opacity: 1; }
}
.principles { position: relative; z-index: 0; }
@media (hover: none), (prefers-reduced-motion: reduce) { .project { transform: none !important; } .magnet { transform: none !important; } }

/* social links: always visible */
.nav-soc { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding-left: 10px; border-left: 1px solid var(--line-2); }
.nav-soc a.soc { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 999px; color: var(--mut); transition: color .2s, background-color .2s; }
.nav-soc a.soc:hover { color: var(--tx); background: var(--bg-2); }
.nav-soc svg { width: 19px; height: 19px; }
.hero .ctas { align-items: center; }
.hero .socials { margin: 0 0 0 6px; display: inline-flex; gap: 6px; }
.hero .socials a { width: 42px; height: 42px; }
.hero .socials svg { width: 20px; height: 20px; }
@media (max-width: 680px) { .nav-soc { border-left: 0; padding-left: 0; margin-left: 0; } .hero .socials { margin: 4px 0 0; width: 100%; } }

/* live Godloom globe on the project card */
.art-godloom-live { background: #0e1428; }
.art-godloom-live canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.art-godloom-live canvas:active { cursor: grabbing; }
.art-godloom-live .word { pointer-events: none; }
.hero.no-canvas { background: radial-gradient(60% 60% at 75% 45%, rgba(255, 107, 61, .28), transparent 60%), radial-gradient(40% 40% at 60% 70%, rgba(20, 80, 100, .25), transparent 70%), var(--bg); }

/* page-wide nebula behind everything */
#nebula { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; opacity: 0; transition: opacity 1.6s ease .2s; }
.ready #nebula { opacity: 1; }
.project { background: color-mix(in srgb, var(--bg-2) 70%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); }
.principles > div::before { background: color-mix(in srgb, var(--bg-2) 70%, transparent); }
.footer { background: none; border-top: 0; }
.contact { border-top: 0; }
.contact { border-top-color: transparent; }

/* Purrlyze card: logo over its own glow */
.art-purrlyze-live { background: radial-gradient(60% 70% at 50% 50%, rgba(154, 143, 245, .32), rgba(63, 224, 236, .1) 45%, transparent 70%), #1f2024; display: grid; place-items: center; }
.art-purrlyze-live img { position: absolute; inset: 0; margin: auto; width: auto; height: 62%; max-width: 70%; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .5)); animation: pz-float 7s ease-in-out infinite; transition: transform .6s var(--ease); }
.project:hover .art-purrlyze-live img { transform: translate(calc(var(--px) * 10px), calc(var(--py) * 8px)) scale(1.04); }
@keyframes pz-float { 0%, 100% { translate: 0 -6px; } 50% { translate: 0 6px; } }
#links { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; display: block; }
.hero.no-canvas { background: radial-gradient(70% 30% at 55% 45%, rgba(150, 170, 230, .18), transparent 70%), var(--bg); }
