/* =================================================================
   LUSH HAKOBIAN — style
   Colours, sizes and spacing live at the top, in one place.
   ================================================================= */

@font-face {
  font-family: "T Star Mono Round";
  src: url("../fonts/T-Star-Mono-Round-Bold.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

:root {
  /* colours */
  --bg:    #F0F0EF;
  --ink:   #000000;
  --muted: #C4B6B4;

  /* type sizes
     clamp(smallest, scales with window, biggest) keeps everything
     in proportion when the window is resized, but never tiny or huge */
  --size-small: clamp(8px, 0.6vw, 14px);     /* © line, really small */
  --size-text:  clamp(13px, 1.25vw, 30px);   /* nav, page text */
  --size-input: var(--size-text);            /* form text */
  --size-big:   min(12.6vw, 26vh);           /* X Y Z (also fits short windows) */
  --xyz-gap:    min(6.3vw, 13vh);

  /* layout */
  --edge:       clamp(20px, 3.6vw, 120px);   /* edge to INFO and CONTACT */
  --nav-top:    clamp(30px, 7.9vh, 120px);
  --footer-bot: clamp(20px, 4.7vh, 80px);
  --home-gap:   clamp(30px, 6.5vh, 100px);   /* space from © line up to XYZ (home link) */
  --bottom-zone: calc(var(--footer-bot) + var(--home-gap) + var(--size-text) * 2);
  --media-width: clamp(280px, 48vw, 1200px); /* photos / videos on media pages */

  /* contact form (follows the text size, so it keeps its shape) */
  --form-width: clamp(260px, 24.2vw, 620px);
  --field-h:    calc(var(--size-input) * 2.72);
  --area-h:     calc(var(--size-input) * 9.44);
  --field-gap:  calc(var(--size-input) * 0.8);
  --field-pad:  calc(var(--size-input) * 0.8);

  --font: "T Star Mono Round", ui-monospace, monospace;
}

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

/* nothing moves, ever */
*, *::before, *::after { transition: none !important; animation: none !important; }
html { scroll-behavior: auto; }

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;           /* phones: real visible height */
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- navigation ---------- */
.nav {
  position: fixed;
  z-index: 10;
  top: var(--nav-top);
  left: var(--edge);
  right: var(--edge);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transform: translateY(-50%);
  font-size: var(--size-text);
  letter-spacing: 0.02em;
}
.nav-link        { color: var(--muted); }
.nav-link.active { color: var(--ink); }
.nav-fixed {                 /* TIME: always black, always centred */
  color: var(--ink);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* ---------- pages ---------- */
.page {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.page.show { display: flex; }

/* a page with a lot of content scrolls between the nav and the footer */
.page-scroll {
  align-items: flex-start;
  overflow-y: auto;
  padding: calc(var(--nav-top) * 2) var(--edge) var(--bottom-zone);
  background: var(--bg);
}
.column {
  width: var(--media-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 2.5vw, 60px);
  margin: auto 0;
}

.text {
  font-size: var(--size-text);
  line-height: 1.45;
  letter-spacing: 0.02em;
}

/* ---------- home: X Y Z ---------- */
.xyz {
  display: flex;
  gap: var(--xyz-gap);
  font-size: var(--size-big);
  line-height: 1;
  transform: translateY(-0.018em);   /* capital letters sit low in their line: this puts their ink exactly in the middle */
}

/* ---------- media ---------- */
.media { width: 100%; }
.media img,
.media video { display: block; width: 100%; height: auto; }
.media audio { display: block; width: 100%; }
.media iframe { display: block; width: 100%; border: 0; }

.media-wide  iframe { aspect-ratio: 16 / 9; height: auto; }      /* Vimeo, YouTube */
.media-tall  iframe { aspect-ratio: 9 / 16; height: auto; max-width: 340px; margin: 0 auto; } /* TikTok */
.media-post  iframe { height: 620px; max-width: 480px; margin: 0 auto; }   /* Instagram */
.media-track iframe { height: 152px; }                            /* Spotify track */
.media-list  iframe { height: 380px; }                            /* Spotify album / playlist */
.media-sound iframe { height: 166px; }                            /* SoundCloud */

/* ---------- contact ---------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--field-gap);
  width: var(--form-width);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--muted);
  border-radius: 0;
  font-family: inherit;
  font-size: var(--size-input);
  letter-spacing: 0.02em;
  color: var(--ink);
  text-align: center;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.contact-form input    { height: var(--field-h); padding: 0 var(--field-pad); }
.contact-form textarea { height: var(--area-h);  padding: var(--field-pad); resize: none; }
.contact-form ::placeholder { color: var(--muted); opacity: 1; text-align: center; }

/* textarea placeholder drawn by hand, so it is centred in every browser (Safari included) */
.field { position: relative; width: 100%; }
.field textarea,
.field input { display: block; }
.field .placeholder.placeholder-line {           /* one-line box (email): centred top to bottom too */
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.field .placeholder {
  position: absolute;
  top: calc(var(--field-pad) + 1px);
  left: 0;
  right: 0;
  text-align: center;
  font-size: var(--size-input);
  line-height: normal;
  letter-spacing: 0.02em;
  color: var(--muted);
  pointer-events: none;
}
.field textarea:not(:placeholder-shown) + .placeholder,
.field input:not(:placeholder-shown) + .placeholder { display: none; }

/* ---------- projects: mini games and sites inside the site ---------- */
/* <section class="page page-project" id="name" data-project="projects/name/index.html"> */
.page-project iframe {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--nav-top) * 2);
  width: 100%;
  height: calc(100% - var(--nav-top) * 2 - var(--bottom-zone));
  border: 0;
  background: transparent;
}
/* add class "page-full" too, to let a project fill the whole screen behind the nav */
.page-project.page-full iframe { top: 0; height: 100%; }

/* ---------- home link (XYZ) — on every page except home ---------- */
.home-link {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: calc(var(--footer-bot) + var(--home-gap));
  transform: translate(-50%, 50%);
  font-size: var(--size-text);
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}
body.is-home .home-link { display: none; }

/* ---------- footer ---------- */
.footer {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: var(--footer-bot);
  transform: translateY(50%);
  text-align: center;
  font-size: var(--size-small);
  letter-spacing: 0.03em;
  pointer-events: none;
}


/* =================================================================
   PHONES & SMALL WINDOWS  (700px wide and below)
   Same design, just sized for a small screen.
   ================================================================= */
@media (max-width: 700px) {
  :root {
    --size-small: 8px;
    --size-text:  14px;
    --size-input: 16px;            /* 16px stops iPhone from zooming in on the form */
    --size-big:   min(22vw, 24vh);
    --xyz-gap:    min(8vw, 9vh);
    --edge:       22px;
    --nav-top:    clamp(34px, 6vh, 56px);
    --footer-bot: clamp(22px, 4vh, 40px);
    --media-width: 100%;
    --form-width: min(100vw - 44px, 420px);
    --field-gap:  12px;
  }
  .page-scroll { padding-left: 22px; padding-right: 22px; }
  .text { padding: 0 22px; }
}

/* phone held upright: X Y Z stacked, bigger menu */
@media (max-width: 700px) and (orientation: portrait) {
  :root {
    --size-text:  clamp(16px, 4.8vw, 22px);  /* INFO  TIME  CONTACT */
    --size-small: 8px;                       /* © line */
    --size-big:   min(25vw, 15vh);           /* X Y Z */
    --edge:       9.5vw;
  }
  .xyz {
    flex-direction: column;
    align-items: center;
    gap: calc(var(--size-big) * 0.5);
    transform: none;
  }
  .text { font-size: 15px; }                 /* page sentences stay calm */
}

/* phone turned sideways (wide but very short) */
@media (max-height: 460px) and (orientation: landscape) {
  :root {
    --nav-top:    28px;
    --footer-bot: 18px;
    --home-gap:   26px;
    --area-h:     calc(var(--size-input) * 6);
  }
}
