/* ==========================================================================
   Charderra Sanjaya — Portfolio
   Direction: type-only-statement
   Type: Anton (display) / Work Sans (text)
   Palette: green-black-bone (#161c1a / #1f2725 / #e3e2da / #8e948d / #9fc7b8)
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --bg: #161c1a;
  --surface: #1f2725;
  --ink: #e3e2da;
  --muted: #8e948d;
  --accent: #9fc7b8;
  --accent-ink: #161c1a;

  --font-display: 'Anton', sans-serif;
  --font-text: 'Work Sans', sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);
  --step-display: clamp(3.5rem, 1rem + 15vw, 14.5rem);

  --margin: clamp(1rem, 2.2vw, 2rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(5rem, 12vw, 13rem);
  --radius: 0px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.5;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, video, svg, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
section[id], header[id] { scroll-margin-top: 56px; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- type ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-wrap: balance;
  hyphens: none;
}
.display {
  font-family: var(--font-display);
  font-size: var(--step-display);
  line-height: 0.86;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.head {
  font-family: var(--font-display);
  font-size: var(--step-head);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.lead { font-size: var(--step-lead); line-height: 1.35; max-width: 40ch; }
.small { font-size: var(--step-small); line-height: 1.45; }
.muted { color: var(--muted); }
p { max-width: 62ch; text-wrap: pretty; }
p + p { margin-top: 0.9em; }
.nums { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.wrap { padding-inline: var(--margin); }
.section { padding-block: calc(var(--section) / 2); }
.section + .section { margin-top: 0; }

/* ---------- controls ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.4rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
  font-size: var(--step-small);
  letter-spacing: 0.02em;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--ink); color: var(--bg); }
}
.link {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.07em;
  transition: text-decoration-color var(--t-hover) ease;
}
.link-plain {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.07em;
}
@media (hover: hover) and (pointer: fine) {
  .link:hover { text-decoration-color: currentColor; }
}

/* ---------- motion helpers ---------- */
.lines .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.lines [data-line] { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] {
    opacity: 0;
    transform: translateY(18px);
    animation: ad-rise var(--t-reveal) var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 90ms + 120ms);
  }
  .js .lines [data-line] {
    transform: translateY(105%);
    animation: ad-line 900ms var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 110ms + 150ms);
  }
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out);
  }
  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }
}
@keyframes ad-rise { to { opacity: 1; transform: none; } }
@keyframes ad-line { to { transform: none; } }


/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  background: var(--bg);
}
.nav__name {
  font-weight: 600;
}
.nav__links {
  display: flex;
  gap: 1.6rem;
}
.nav__links a {
  font-weight: 600;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 56px;
}
.hero__headline {
  margin-top: -5vh;
}
.hero__headline .line:first-child [data-line] {
  text-align: left;
}
.hero__headline .line:last-child [data-line] {
  text-align: right;
}
.hero__bottom {
  position: absolute;
  bottom: clamp(20px, 4vh, 40px);
  left: var(--margin);
  right: var(--margin);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}
.hero__sub {
  font-size: clamp(1rem, 0.9rem + 0.3vw, 1.125rem);
  max-width: 44ch;
  line-height: 1.5;
}
.hero__actions { display: flex; align-items: center; gap: 1.5rem; }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about__body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 48em) {
  .about__body {
    grid-template-columns: minmax(0, 34%) 1fr;
    gap: 4rem;
    align-items: end;
  }
}
.about__heading { margin-bottom: 2.5rem; }
.about__portrait { background: var(--accent); isolation: isolate; }
.about__portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 15%;
  filter: grayscale(1) contrast(1.05);
  mix-blend-mode: multiply;
}
.about__text .lead { max-width: 28ch; margin-bottom: 1.5rem; }
.about__text > .about__facts { margin-top: 2.5rem; }
.about__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 3rem;
}
.about__fact {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.about__record {
  margin-top: calc(var(--section) * 0.6);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 48em) {
  .about__record {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding-left: calc(34% - var(--margin));
  }
}
.about__record-title {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--ink);
  font-weight: 600;
}
.about__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.about__list-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* ==========================================================================
   WORK
   ========================================================================== */
.work {
  background: var(--surface);
}
.work__heading {
  margin-bottom: 2rem;
}
.work__ledger {
  display: flex;
  flex-direction: column;
}
.work__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1rem 0;
  text-decoration: none;
  transition: opacity var(--t-hover) ease;
}
.work__name {
  font-size: var(--step-body);
  font-weight: 600;
}
.work__tech {
  display: none;
}
@media (min-width: 48em) {
  .work__tech { display: inline; }
  .work__row {
    grid-template-columns: 1fr auto auto;
    padding: 1.15rem 0;
  }
}
@media (hover: hover) and (pointer: fine) {
  .work__ledger:hover .work__row { opacity: 0.35; }
  .work__ledger:hover .work__row:hover { opacity: 1; }
  .work__row:hover .work__name { color: var(--accent); }
  .work__name { transition: color var(--t-hover) ease; }
}

/* featured project */
.work__feature { display: grid; gap: 2rem; margin-bottom: calc(var(--section) / 3); }
@media (min-width: 48em) {
  .work__feature { grid-template-columns: 1.3fr 1fr; gap: var(--gutter); align-items: end; }
  .work__feature-text { padding-left: 2rem; }
}
.work__shot { display: block; }
.work__shot img { width: 100%; height: auto; }
.work__title { font-size: var(--step-head); line-height: 0.92; text-transform: uppercase; margin-bottom: 1rem; }
.work__feature-text > p { margin-top: 0.8rem; }
.work__points { display: flex; flex-direction: column; gap: 0.35rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }

/* ==========================================================================
   SKILLS
   ========================================================================== */
.skills__heading { margin-bottom: 2rem; }
.skills__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.skills__item {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 0.8rem + 3vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0.2em 0.4em;
  transition: color var(--t-hover) ease;
}
@media (hover: hover) and (pointer: fine) {
  .skills__list:hover .skills__item { color: var(--muted); }
  .skills__list:hover .skills__item:hover { color: var(--accent); }
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact {
  padding: 0;
}
.contact__rows {
  display: flex;
  flex-direction: column;
}
.contact__row {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  min-height: clamp(80px, 10vw, 150px);
  padding: 0 var(--margin);
  padding-bottom: clamp(12px, 2vw, 24px);
}
.contact__row--alt {
  background: var(--surface);
}
.contact__row--accent {
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.contact__text {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1rem + 4vw, 5.5rem);
  line-height: 1.0;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.contact__row--accent .contact__text {
  color: var(--accent-ink);
}
.contact__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(40px, 6vw, 72px);
  height: clamp(40px, 6vw, 72px);
  border-radius: 50%;
  background: var(--accent-ink);
  color: var(--accent);
  transition: transform var(--t-press) var(--ease-out);
  flex-shrink: 0;
  margin-bottom: clamp(8px, 1.5vw, 20px);
}
.contact__arrow:active { transform: scale(0.93); }
@media (hover: hover) and (pointer: fine) {
  .contact__arrow:hover { transform: scale(1.08); }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--accent);
  color: var(--accent-ink);
  min-height: 90svh;
  display: flex;
  flex-direction: column;
  position: relative;
}
.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 40px;
}
.footer__notes {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.footer__note {
  color: var(--accent-ink);
  opacity: 0.7;
}
.footer__back {
  color: var(--accent-ink);
  opacity: 0.7;
}
.footer__contact {
  flex: 1;
  display: flex;
  align-items: flex-end;
  padding-bottom: 3rem;
}
.footer__name { color: var(--accent-ink); font-size: clamp(3.5rem, 1rem + 15vw, 17rem); max-width: none; }
.footer__name span { display: block; }
.footer__meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 2rem;
  gap: 1rem;
}
.footer__meta-links {
  display: flex;
  gap: 1.5rem;
}
.footer__meta-links a {
  color: var(--accent-ink);
  opacity: 0.7;
}
.footer__meta-copy {
  color: var(--accent-ink);
  opacity: 0.5;
}

/* ==========================================================================
   PHONE LAYOUT
   ========================================================================== */
@media (max-width: 47.99em) {
  .hero__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .hero__actions { width: 100%; justify-content: space-between; }
  .contact__text {
    font-size: clamp(1.4rem, 4vw + 0.5rem, 2.5rem);
  }
  .footer__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
