/* ============================================================
   dilara tanrıöven - portfolio
   Tokens: warm monochrome, one color break (project photography)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root{
  --bg: #FAF9F6;
  --bg-dark: #14130F;
  --text: #14130F;
  --text-inverse: #FAF9F6;
  --muted: #86847C;
  --line: #DEDCD3;
  --line-dark: #3A3934;

  --font-display: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  --gutter: clamp(24px, 5vw, 64px);
  --max: 1280px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  /* keeps the footer at the bottom of the window on short pages */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }

::selection{ background: var(--text); color: var(--bg); }

/* focus visibility (accessibility floor) */
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.wrap{
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------------- Nav ---------------- */

.nav{
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.nav .brand{ font-weight: 500; }

.nav .links{
  display: flex;
  gap: 28px;
  color: var(--muted);
}

.nav .links a{ position: relative; }
.nav .links a:hover,
.nav .links a[aria-current="page"]{ color: var(--text); }

.nav .links a[aria-current="page"]::after{
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -28px;
  height: 1px;
  background: var(--text);
  display: none;
}

/* ---------------- Page grid (shared two-column page layout) ---------------- */
/* A fixed/sticky left rail (title, meta, facts) plus a scrolling right
   column for the page's main content -- used on every page. */

.page-grid,
.project-grid{
  display: grid;
  grid-template-columns: minmax(240px, 400px) 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
  padding-top: clamp(40px, 7vw, 80px);
  padding-bottom: clamp(40px, 7vw, 80px);
}

.page-left,
.project-left{
  position: sticky;
  top: clamp(96px, 12vh, 140px);
}

.page-left .eyebrow,
.project-left .eyebrow{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
}

.page-left h1,
.project-left h1{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

/* Home page hero title: always a single line ("Interaction design.") */
.hero-title{ white-space: nowrap; }

/* its subtitle: two lines, each flush with the title on both sides
   (script.js sizes it to the exact title width) */
.page-left .hero-title em{
  font-size: 0.66em;
  line-height: 1.25;
  white-space: nowrap;
  margin-top: 10px;
}
.page-left .hero-title em span{ display: block; width: max-content; }

.page-left h1 em{
  display: block;
  font-style: normal;
  font-weight: 300;
  font-size: 0.62em;
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--muted);
  margin-top: 8px;
  white-space: normal;
}

.page-left .lede,
.page-left .dek,
.project-left .dek{
  font-size: 14px;
  line-height: 1.6;
  max-width: 34ch;
  color: var(--muted);
  margin: 0;
}

.page-right,
.project-right{ min-width: 0; }

/* ---------------- Index (project list) ---------------- */

.index-row{
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: baseline;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: opacity .25s ease;
}

.index:hover .index-row{ opacity: .38; }
.index-row:hover{ opacity: 1 !important; }

.index-row[hidden]{ display: none; }

/* filter toggles above the project list */
.filters{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.filter{
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  margin: 0;
  padding: 4px 0;
  font: inherit;
  letter-spacing: inherit;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}

.filter:hover{ color: var(--text); }
.filter.is-active{ color: var(--text); border-bottom-color: var(--text); }

.filter .count{
  margin-left: 2px;
  font-size: 10px;
  vertical-align: super;
  color: var(--muted);
}

.index-row .num{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.index-row .title{
  font-family: var(--font-display);
  font-size: clamp(22px, 3.4vw, 38px);
  font-weight: 500;
}

.index-row .type{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.index-row .year{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  min-width: 3.5ch;
  text-align: right;
}

.index-row .title-wrap{ display: block; min-width: 0; }
.index-row .hook{
  display: block;
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.45;
  color: var(--muted);
}

/* hover-reveal preview: the one color break in an otherwise
   monochrome page. images keep their original color. */

.preview{
  position: fixed;
  top: 0; left: 0;
  max-width: 320px;
  max-height: 280px;
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transition: opacity .2s ease;
  overflow: hidden;
  background: var(--bg-dark);
  box-shadow: 0 18px 40px rgba(20,19,15,.18);
}

.preview.is-visible{ opacity: 1; }

.preview img{
  display: block;
  width: auto;
  height: auto;
  max-width: 320px;
  max-height: 280px;
}

/* placeholder swatch used until real project photography is added */
.preview .swatch{
  width: 280px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bg);
  text-align: center;
  padding: 16px;
}

/* narrower than a full desktop (incl. tablets): the right column is too tight
   for title + type + year on one line, so stack type and year under the title */
@media (max-width: 1100px){
  .index-row{ grid-template-columns: 32px 1fr; row-gap: 6px; }
  .index-row .type,
  .index-row .year{ grid-column: 2; text-align: left; }
}

@media (max-width: 720px){
  .preview{ display: none; } /* no hover on touch - see mobile fallback thumbnails */
  .index-row{ grid-template-columns: 32px 1fr; row-gap: 6px; }
  .index-row .type,
  .index-row .year{ grid-column: 2; text-align: left; }
}

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

footer{
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 18px 0 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

footer .wrap{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

footer .statement{
  max-width: 44ch;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
}

footer .meta a{ color: var(--muted); }
footer .meta a:hover{ color: var(--text); }

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

.about-title{ font-size: clamp(26px, 3vw, 34px) !important; }

.about-grid{
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.about-grid figure{
  margin: 0;
  aspect-ratio: 3/4;
  background: var(--bg-dark);
}

.about-grid figure img{ width: 100%; height: 100%; object-fit: cover; }

.about-copy .placeholder-block{
  border: 1px dashed var(--line);
  padding: 20px;
  color: var(--muted);
  font-style: italic;
  font-size: 15px;
  margin-bottom: 24px;
}

/* contact buttons: visibly clickable before any hover */
.contact-actions{ display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 12px 18px;
  border: 1px solid var(--text);
  border-radius: 999px;
  transition: background .2s ease, color .2s ease;
}
.btn span{ transition: transform .2s ease; }
.btn:hover{ background: var(--text); color: var(--bg); }
.btn:hover span{ transform: translateX(3px); }
.btn--solid{ background: var(--text); color: var(--bg); }
.btn--solid:hover{ background: transparent; color: var(--text); }

.link{ text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.link:hover{ text-decoration-color: currentColor; }
footer .meta a{ text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- Project page (shares .page-grid) ---------------- */

.project-left h1{ font-size: clamp(22px, 2.2vw, 30px); }

.project-left .dek{
  font-family: var(--font-display);
  font-weight: 300;
  margin-top: 4px;
}

.meta-row{
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px 0 0;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}

.meta-row dt{ color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .06em; margin-bottom: 6px;}
.meta-row dd{ margin: 0; max-width: 30ch; }

.project-figure{
  margin: 0 auto;
  padding-bottom: clamp(32px, 6vw, 56px);
}

.project-right > .project-figure:first-child{
  padding-top: 0;
}

.project-figure .frame{
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-dark);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  padding: 24px;
}

.project-body{
  padding-bottom: clamp(32px, 6vw, 56px);
  margin-bottom: clamp(32px, 6vw, 56px);
  border-bottom: 1px solid var(--line);
}

.project-body:last-of-type{ border-bottom: none; }

.project-body h2{
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 0 0 16px;
}

.project-body h2:empty{ display: none; margin: 0; }

.project-body .content p{
  font-size: 15px;
  line-height: 1.6;
  max-width: none;
  margin: 0 0 18px;
}

.project-body .content p:last-child{ margin-bottom: 0; }

.project-nav{
  padding-top: clamp(24px, 5vw, 40px);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 13px;
}

.project-nav .dir{
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: block;
  margin-bottom: 6px;
}

.project-nav a{ font-family: var(--font-display); font-size: 18px; }

@media (max-width: 780px){
  .page-grid,
  .project-grid{ grid-template-columns: 1fr; }
  .page-left,
  .project-left{ position: static; }
  .about-grid{ grid-template-columns: 1fr; }
}

/* ---------------- Small screens (phones) ---------------- */

@media (max-width: 600px){
  :root{ --gutter: 20px; }

  .nav .wrap{ height: 60px; font-size: 11px; }
  .nav .links{ gap: 16px; }

  .page-left h1{ max-width: 100%; }
  /* larger title on phones so the flush subtitle stays readable */
  .page-left .hero-title{ font-size: clamp(28px, 9vw, 36px); }

  .index-row{ padding: 20px 0; gap: 12px; }
  .index-row .title{ font-size: 20px; }

  .project-left .dek{ max-width: 100%; }
  .meta-row{ gap: 16px; padding-top: 20px; }

  .project-figure .frame{ font-size: 11px; padding: 16px; }

  .project-nav{ flex-direction: column; gap: 24px; align-items: flex-start; }

  footer .wrap{ flex-direction: column; align-items: flex-start; gap: 16px; }
}

