/* jessica orianto — portfolio
   Built from the Figma frames "Landing Page" and "About". */

@font-face { font-family: "Geist"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("fonts/geist-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Libre Bodoni"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/libre-bodoni-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Libre Bodoni"; font-weight: 700; font-style: italic; font-display: swap; src: url("fonts/libre-bodoni-latin-700-italic.woff2") format("woff2"); }

:root {
  --ink: #0a0a0a;
  --line: #ebebeb;
  --placeholder: #ebebeb;
  --muted: rgba(10, 10, 10, 0.6);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Libre Bodoni", "Bodoni 72", Georgia, serif;
  --column: 1150px;
  /* Figma easings: "Gentle" is a spring (stiffness 100, damping 15); "Ease out" is the standard curve */
  --ease-gentle: cubic-bezier(0.25, 0.9, 0.3, 1);
  --ease-out: cubic-bezier(0, 0, 0.58, 1);
  --dur-card: 800ms;   /* project cards + buttons */
  --dur-text: 450ms;   /* name + say hello */
  --dur-menu: 600ms;   /* menu */
  --dur-page: 800ms;   /* page navigation (Smart animate, Gentle) */
}

@supports (transition-timing-function: linear(0, 1)) {
  :root { --ease-gentle: linear(0, 0.0122, 0.0448, 0.0927, 0.1515, 0.2174, 0.2873, 0.3588, 0.4298, 0.4988, 0.5645, 0.6263, 0.6834, 0.7356, 0.7826, 0.8246, 0.8616, 0.8938, 0.9215, 0.9451, 0.9649, 0.9812, 0.9944, 1.0049, 1.013, 1.019, 1.0233, 1.0262, 1.0278, 1.0284, 1.0282, 1.0274, 1.0261, 1.0245, 1.0226, 1.0207, 1.0187, 1.0166, 1.0147, 1.0128, 1); }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  position: relative;
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* The two faint vertical rules. Work: 1150px apart. About: 885px apart.
   They are their own element so they can slide between the two widths. */
.rules {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(1150px, 100%);
  transform: translateX(-50%);
  border-left: 0.8px solid var(--line);
  border-right: 0.8px solid var(--line);
  pointer-events: none;
}
.rules--about { width: min(885px, 100%); }

/* Centre column */
.page {
  max-width: var(--column);
  min-height: 100vh;
  margin: 0 auto;
  padding: 100px 0 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- Header ---------- */

.name {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 54px;
  line-height: normal;
  letter-spacing: -2.1px;
  word-spacing: 4px;
  text-align: center;
  white-space: nowrap;
  color: var(--ink);
  transition: letter-spacing var(--dur-text) var(--ease-out);
}
@media (hover: hover) {
  .name:hover { letter-spacing: -1.1px; }
}

/* the Figma name sits a little lower on the About frame */
.page--about { padding-top: 124px; }
.page--about .nav { margin-top: 40px; }

.roles {
  margin: 14px 0 0;
  font-weight: 700;
  font-size: 12px;
  line-height: normal;
  letter-spacing: 0.48px;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.8);
  text-align: center;
}

.nav {
  margin-top: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.nav a {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  width: 60px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 100px;
  font-weight: 300;
  font-size: 10px;
  line-height: normal;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  transition:
    font-weight var(--dur-menu) var(--ease-gentle),
    color var(--dur-menu) var(--ease-gentle),
    background-color var(--dur-menu) var(--ease-gentle),
    border-color var(--dur-menu) var(--ease-gentle),
    box-shadow var(--dur-menu) var(--ease-gentle);
}

/* widths from the Figma menu items */
.nav a:first-child { width: 57px; }

/* Hover: text turns bold (no pill) */
@media (hover: hover) {
  .nav a:hover { font-weight: 700; }
}

/* Selected: Medium text inside a thin pill */
.nav a[aria-current="page"] {
  font-weight: 500;
  border-color: var(--line);
}

/* Selected + hover: pill lifts to white with a soft shadow, text goes light */
@media (hover: hover) {
  .nav a[aria-current="page"]:hover {
    font-weight: 300;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
  }
}

/* ---------- Work grid ---------- */

.grid {
  width: 100%;
  margin-top: 57px;
  padding: 0 89px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 32px;
  row-gap: 60px;
}

/* Fixed-height slot so the hover panel can grow without moving neighbours */
.card {
  position: relative;
  display: block;
  width: min(100%, 300px);
  height: 268px;
  margin: 0 auto;
  color: inherit;
}

.card__panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0);
  transition:
    padding var(--dur-card) var(--ease-gentle),
    background-color var(--dur-card) var(--ease-gentle),
    border-color var(--dur-card) var(--ease-gentle),
    box-shadow var(--dur-card) var(--ease-gentle);
}

.card__image {
  display: block;
  width: 100%;
  height: 238px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--placeholder);
  box-shadow:
    0 0 4px rgba(0, 0, 0, 0.05),
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 4px 20px rgba(0, 0, 0, 0.1);
  transition: height var(--dur-card) var(--ease-gentle), border-radius var(--dur-card) var(--ease-gentle);
}

.card__label {
  display: block;
  padding: 0 4px;
  font-weight: 500;
  font-size: 10px;
  line-height: normal;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* Hidden at rest, revealed on hover / keyboard focus */
.card__more {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: -18px; /* cancels the flex gap while collapsed */
  transition:
    grid-template-rows var(--dur-card) var(--ease-gentle),
    opacity var(--dur-card) var(--ease-gentle),
    margin-top var(--dur-card) var(--ease-gentle);
}

.card__more > div { overflow: hidden; min-height: 0; padding: 0 8px 8px 4px; }

.card__title {
  margin: 0 0 12px;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.2;
  color: rgba(10, 10, 10, 0.95);
}

.card__text {
  margin: 0;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(10, 10, 10, 0.4);
}

@media (hover: hover) {
  .card:hover, .card:focus-visible { z-index: 2; }

  .card:hover .card__panel,
  .card:focus-visible .card__panel {
    padding: 12px 12px 16px;
    background: rgba(255, 255, 255, 0.5);
    border-color: var(--line);
    box-shadow: 0 10px 16px rgba(0, 0, 0, 0.03), 0 2px 10px rgba(0, 0, 0, 0.02);
  }

  .card:hover .card__image,
  .card:focus-visible .card__image { height: 115px; border-radius: 8px; }

  .card:hover .card__more,
  .card:focus-visible .card__more {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 0;
  }
}

.card:focus-visible { outline: none; }
.card:focus-visible .card__panel { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- About ---------- */

.bio {
  width: min(501px, calc(100% - 48px));
  margin: 64px 0 0;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.14px;
  text-align: center;
  color: rgba(10, 10, 10, 0.75);
  opacity: 0.85;
}

.bio p { margin: 0 0 21px; }
.bio p:last-child { margin-bottom: 0; }

.experience {
  width: min(641px, calc(100% - 32px));
  margin: 64px 0 0;
  padding: 56px 48px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 48px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.03);
}

.role {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  opacity: 0.85;
  color: #1e1e1e;
}

.role__main { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }

.role__logo {
  flex: none;
  width: 20px;
  height: 20px;
  /* show each logo at its own size, centred in the 20px square (as in Figma) */
  object-fit: none;
  object-position: center;
}
.role__logo--tall { height: 22px; }

.role__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.role__company { margin: 0; font-weight: 600; font-size: 14px; line-height: 1.217; }
.role__company a {
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-text) var(--ease-out);
}
@media (hover: hover) {
  .role__company a:hover { border-bottom-color: rgba(30, 30, 30, 0.35); }
}
.role__company a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.role__title { margin: 0; font-weight: 400; font-size: 13px; line-height: 1.217; }

.role__list {
  margin: 0;
  padding: 0 0 0 16.5px;
  list-style: disc;
  font-weight: 400;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(30, 30, 30, 0.9);
}

.role__year { flex: none; width: 50px; text-align: center; font-weight: 500; font-size: 13px; line-height: 1.217; }

/* ---------- Footer ---------- */

.footer {
  width: 100%;
  padding: 0 16px;
  margin-top: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.hello {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 4px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.14px;
  opacity: 0.85;
}

.hello em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: rgba(10, 10, 10, 0.65);
}

.hello a {
  font-weight: 300;
  color: rgba(10, 10, 10, 0.8);
  border-bottom: 1px solid rgba(235, 235, 235, 0);
}

/* Hover: the link gets 6px breathing room each side and a soft underline;
   the neighbouring words ease apart. Link text itself stays put. */
.hello a { padding: 0; transition: padding var(--dur-text) var(--ease-out), border-color var(--dur-text) var(--ease-out); }

/* "Email copied" note that floats above the address after a click */
.hello a[href^="mailto:"] { position: relative; cursor: copy; }
.copied {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translate(-50%, 4px);
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  font-size: 11px;
  line-height: 18px;
  letter-spacing: 0.2px;
  color: rgba(10, 10, 10, 0.7);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-text) var(--ease-out), transform var(--dur-text) var(--ease-out);
}
.copied.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (hover: hover) {
  .hello a:hover { padding: 0 6px; border-bottom-color: var(--line); }
}

/* touch devices have no hover: keep a faint underline so links read as links */
@media (hover: none) {
  .hello a { border-bottom-color: var(--line); }
}

.to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  transition:
    height var(--dur-card) var(--ease-gentle),
    padding var(--dur-card) var(--ease-gentle),
    box-shadow var(--dur-card) var(--ease-gentle);
}

.to-top span {
  display: block;
  padding: 4px 16px;
  font-weight: 400;
  font-size: 12px;
  line-height: 18px;
  color: rgba(108, 108, 108, 0.75);
  white-space: nowrap;
  transition:
    padding var(--dur-card) var(--ease-gentle),
    font-size var(--dur-card) var(--ease-gentle),
    color var(--dur-card) var(--ease-gentle);
}

/* Hover: pill tightens to 38px, lifts with a soft shadow, text grows to 13px */
@media (hover: hover) {
  .to-top:hover {
    height: 38px;
    padding: 6px 8px;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.05), 0 4px 7.5px rgba(0, 0, 0, 0.05);
  }
  .to-top:hover span {
    padding: 6px 16px;
    font-size: 13px;
    color: rgba(108, 108, 108, 0.9);
  }
}

/* ---------- Page navigation: Smart animate, Gentle, 800ms ---------- */

@view-transition { navigation: auto; }

.name  { view-transition-name: name; }
.nav   { view-transition-name: nav; }
.hello { view-transition-name: hello; }
.to-top { view-transition-name: totop; }

/* page dissolve: short, plain ease-out (no spring overshoot) */
::view-transition-group(root) {
  animation-duration: 450ms;
  animation-timing-function: var(--ease-out);
}

::view-transition-group(*) {
  animation-duration: var(--dur-page);
  animation-timing-function: var(--ease-gentle);
}


/* ---------- Smaller screens ---------- */

@media (max-width: 1180px) {
  .rules:not(.rules--about) { display: none; }
}
@media (max-width: 930px) {
  .rules { display: none; }
}

@media (max-width: 900px) {
  .grid { padding: 0 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .page { padding-top: 56px; }
  .page--about { padding-top: 56px; }
  .name { font-size: 40px; letter-spacing: -2.2px; }
  .grid { padding: 0 24px; grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
  .card { width: 100%; }
  .experience { padding: 32px 20px; gap: 36px; }
  .role { align-items: flex-start; }
  .role__year { width: auto; }
  .hello { flex-direction: column; gap: 2px; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
