:root {
  --bg: #0d0d0f;
  --bg-soft: #131316;
  --text: #f2f2f0;
  --muted: #8a8a90;
  --line: #232327;
  --accent: #ff4d00;
  --mono: "JetBrains Mono", monospace;
  --sans: "Inter", -apple-system, sans-serif;
  --display: "Unbounded", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono { font-family: var(--mono); }

a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  font-size: 12px;
  letter-spacing: 0.08em;
  background: rgba(13, 13, 15, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-name {
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.topbar-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 28px;
}

.topbar-nav a, .lang a { opacity: 0.65; transition: opacity 0.2s; }
.topbar-nav a:hover, .lang a:hover, .lang a.on { opacity: 1; }

.lang {
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.lang a.on { color: var(--accent); }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
}

.ribbons {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.ribbons path {
  fill: none;
  stroke: #2b2b31;
  stroke-width: 1.2;
  opacity: 0.8;
}

.ribbons path.accent {
  stroke: var(--accent);
  stroke-width: 1.4;
  opacity: 0.55;
}

.wordmark {
  position: absolute;
  top: 9vh;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(64px, 15.5vw, 300px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--text);
  z-index: 1;
  user-select: none;
}

.marquee {
  position: absolute;
  top: 63%;
  left: 0;
  width: 100%;
  z-index: 2;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(13, 13, 15, 0.55);
  overflow: hidden;
  padding: 10px 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 56s linear infinite;
  will-change: transform;
}

.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.marquee-group span,
.marquee-group i {
  flex-shrink: 0;
  margin-right: 28px;
  letter-spacing: 0.28em;
}

.marquee-group i {
  font-style: normal;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0;
}

@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

.portrait {
  position: absolute;
  bottom: -4vh;
  left: 0;
  right: 0;
  margin-inline: auto;
  width: max-content;
  height: min(86vh, 1400px);
  z-index: 3;
  pointer-events: none;
  /* dissolve the hard torso cut into the page background */
  -webkit-mask-image:
    linear-gradient(to bottom, #000 0%, #000 58%, rgba(0, 0, 0, 0.55) 78%, transparent 100%),
    radial-gradient(120% 100% at 50% 40%, #000 42%, transparent 78%);
  mask-image:
    linear-gradient(to bottom, #000 0%, #000 58%, rgba(0, 0, 0, 0.55) 78%, transparent 100%),
    radial-gradient(120% 100% at 50% 40%, #000 42%, transparent 78%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* soft glow behind the silhouette to separate it from the dark background */
.portrait::before {
  content: "";
  position: absolute;
  inset: -10% -30%;
  background: radial-gradient(50% 45% at 50% 45%, rgba(255, 122, 60, 0.14), transparent 70%);
  z-index: -1;
  -webkit-mask-image: none;
  mask-image: none;
}

.portrait img {
  height: 100%;
  width: auto;
  display: block;
  /* no CSS filter/transform — those force soft GPU compositing on Retina */
}

/* dark veil at the hero floor so the fade meets the next section cleanly */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  background: linear-gradient(to bottom, transparent, var(--bg) 78%);
  z-index: 3;
  pointer-events: none;
}

.hero-slogan {
  position: absolute;
  left: 28px;
  bottom: 40px;
  z-index: 4;
  max-width: 420px;
}

.hero-sub {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.slogan-text {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 32px);
  line-height: 1.25;
}

.hero-socials {
  position: absolute;
  right: 28px;
  bottom: 40px;
  z-index: 4;
  display: flex;
  gap: 14px;
}

.hero-socials a {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.hero-socials a svg {
  display: block;
  flex-shrink: 0;
}

.hero-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 4;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  animation: float 2.4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 6px); }
}

/* ---------------------------------------------------------------- sections */

.section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 130px 28px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 56px;
}

.section-head span { color: var(--accent); font-size: 12px; }

/* credo */

.credo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px 72px;
}

.credo-num { color: var(--accent); font-size: 12px; }

.credo-item h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 30px);
  margin: 12px 0 14px;
}

.credo-item p { color: var(--muted); max-width: 46ch; }

/* projects */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  position: relative;
  border: 1px solid var(--line);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-soft);
  transition: border-color 0.25s, transform 0.25s;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-top h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
}

.status {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  white-space: nowrap;
  color: var(--muted);
}

.status-active   { color: #4ade80; border-color: rgba(74, 222, 128, 0.35); }
.status-building { color: var(--accent); border-color: rgba(255, 77, 0, 0.4); }
.status-published { color: #4ade80; border-color: rgba(74, 222, 128, 0.35); }
.status-concept  { color: #9aa0ff; border-color: rgba(154, 160, 255, 0.35); }
.status-archived { color: var(--muted); border-color: var(--line); }

.project-desc { color: var(--muted); font-size: 15px; flex: 1; }

.project-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}

/* home apps (under projects) */

.home-apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.home-app-card {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 100%;
  color: inherit;
  transition: border-color 0.25s, transform 0.25s;
}

.home-app-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.home-app-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-app-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #1a1a1e;
  flex-shrink: 0;
}

.home-app-icon-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  background:
    linear-gradient(145deg, rgba(255, 77, 0, 0.14), transparent 60%),
    #1a1a1e;
}

.home-app-titles {
  flex: 1;
  min-width: 0;
}

.home-app-title-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.home-app-titles h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.15;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.home-app-title-row .status {
  flex: 0 0 auto;
  margin-left: auto;
}

.home-app-full {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-app-blurb {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.home-app-stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.home-app-stores a {
  color: var(--muted);
  transition: color 0.2s;
}

.home-app-stores a:hover {
  color: var(--accent);
}

.home-app-link {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  margin-top: auto;
  padding-top: 8px;
  transition: color 0.2s;
  align-self: flex-start;
}

.home-app-card:hover .home-app-link { color: var(--accent); }

/* connect */

.project-tags { color: #5c5c63; letter-spacing: 0.06em; }

.project-link {
  color: var(--text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.project-link:hover { color: var(--accent); }

/* stretch the link over the whole card so it's fully clickable */
.project-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* path / timeline */

.path-line {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 32px);
  max-width: 22ch;
  margin: -12px 0 64px;
  line-height: 1.25;
}

.path-timeline {
  --age-w: 120px;
  --rail-w: 32px;
  --mark: 12px;
  --mark-gap: 8px;
  --mark-top: 8px; /* marker margin-top */
  --item-pad-top: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* one rail, clipped under opaque marker plugs — starts at first dot center */
.path-timeline::before {
  content: "";
  position: absolute;
  left: calc(var(--age-w) + (var(--rail-w) - 1px) / 2);
  top: calc(var(--item-pad-top) + var(--mark-top) + var(--mark) / 2);
  bottom: calc(8px + var(--mark-top) + var(--mark) / 2);
  width: 1px;
  z-index: 0;
  background: linear-gradient(
    to bottom,
    var(--accent),
    var(--line) 72px,
    var(--line) calc(100% - 72px),
    rgba(255, 77, 0, 0.35)
  );
  pointer-events: none;
}

.path-item {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--age-w) var(--rail-w) minmax(0, 1fr);
  align-items: start;
  column-gap: 0;
  padding: var(--item-pad-top) 0 44px;
}

.path-item:last-child { padding-bottom: 8px; }

/* dim copy only — opacity on the whole row makes the rail pierce hollow dots */
.path-timeline:hover .path-item .path-age,
.path-timeline:hover .path-item .path-body {
  opacity: 0.4;
  transition: opacity 0.25s;
}
.path-timeline:hover .path-item:hover .path-age,
.path-timeline:hover .path-item:hover .path-body {
  opacity: 1;
}

.path-age {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0 20px 0 0;
  text-align: right;
}

.path-age-num {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 500;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.path-age-unit {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.path-marker {
  grid-column: 2;
  position: relative;
  width: var(--mark);
  height: var(--mark);
  margin: var(--mark-top) auto 0;
  border-radius: 50%;
  box-sizing: border-box;
  /* solid plug + halo so the rail stops cleanly at the ring */
  background-color: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 var(--mark-gap) var(--bg);
}

.path-item-next .path-marker {
  background-color: var(--accent);
  border-color: var(--accent);
  box-shadow:
    0 0 0 var(--mark-gap) var(--bg),
    0 0 0 calc(var(--mark-gap) + 4px) rgba(255, 77, 0, 0.12);
}

.path-item-next .path-age-num { color: var(--accent); }

.path-body {
  grid-column: 3;
  padding: 2px 0 0 28px;
  min-width: 0;
}

.path-body h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(18px, 2vw, 24px);
  margin-bottom: 10px;
  line-height: 1.25;
}

.path-body p {
  color: var(--muted);
  font-size: 15px;
  max-width: 46ch;
  line-height: 1.6;
}

.path-next-sub {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 2px;
}

.path-item-next .path-body h3 {
  color: var(--muted);
  font-weight: 500;
}

/* about */

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 72px;
  align-items: center;
}

.about-text { text-align: left; }

.about-text p {
  color: #c9c9cc;
  margin: 0 0 20px;
  max-width: 52ch;
}

.about-text p:last-child { margin-bottom: 0; }

.about-channel {
  display: block;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}

.about-channel:hover { border-color: var(--accent); transform: translateY(-4px); }

.about-channel img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--line);
}

.about-channel-body { padding: 24px 26px 26px; }

.about-channel-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.about-channel-handle {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 12px;
}

.about-channel-body p { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

.about-channel-cta {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  transition: color 0.2s;
}

.about-channel:hover .about-channel-cta { color: var(--accent); }

/* connect */

.connect-line {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 32px);
  max-width: 22ch;
  margin-bottom: 48px;
}

.connect-links { display: flex; flex-direction: column; border-top: 1px solid var(--line); }

.connect-links a {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 24px 4px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 500;
  transition: padding-left 0.25s, color 0.25s;
}

.connect-links a span {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  width: 110px;
  flex-shrink: 0;
}

.connect-links a em { font-style: normal; color: var(--muted); margin-left: auto; }

.connect-links a:hover { padding-left: 20px; color: var(--accent); }

/* footer */

.footer {
  max-width: 1160px;
  margin: 0 auto;
  padding: 110px 28px 40px;
  font-size: 11px;
  color: #5c5c63;
}

.footer a {
  color: inherit;
  border-bottom: 1px solid rgba(255, 77, 0, 0.35);
  transition: color 0.2s, border-color 0.2s;
}

.footer a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* reveal on scroll */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- mobile */

@media (max-width: 1100px) {
  .home-apps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .topbar { padding: 16px 18px; }
  .topbar-nav { display: none; }

  .hero { min-height: 560px; }
  .wordmark { top: 12vh; font-size: 19vw; }
  .portrait { height: 70vh; bottom: -2vh; }
  .marquee { top: 58%; }

  .hero-slogan { left: 18px; bottom: 96px; max-width: 300px; }
  .hero-socials { right: 18px; bottom: 96px; flex-direction: column; }
  .hero-socials a { width: 44px; height: 44px; }

  .section { padding: 90px 18px 0; }
  .credo-grid, .projects-grid, .about-grid, .home-apps-grid { grid-template-columns: 1fr; gap: 20px; }
  .path-timeline {
    --age-w: 0px;
    --rail-w: 20px;
    --item-pad-top: 6px;
    --mark-top: 6px;
  }
  .path-timeline::before {
    left: calc((var(--rail-w) - 1px) / 2);
    bottom: calc(8px + var(--mark-top) + var(--mark) / 2);
  }
  .path-item {
    grid-template-columns: var(--rail-w) minmax(0, 1fr);
    padding: var(--item-pad-top) 0 36px;
  }
  .path-marker {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin: var(--mark-top) auto 0;
  }
  .path-age {
    grid-column: 2;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    text-align: left;
    padding: 0 0 8px 16px;
  }
  .path-age-num { font-size: 22px; }
  .path-age-unit { margin-top: 0; }
  .path-body {
    grid-column: 2;
    padding: 0 0 0 16px;
  }
  .path-timeline:hover .path-item .path-age,
  .path-timeline:hover .path-item .path-body { opacity: 1; }
  .footer { padding: 80px 18px 32px; }
}
