/* ==========================================================================
   ALPER KEMAL ÖZKORKMAZ — Photographer & Visual Producer
   style.css — design tokens, base styles and components (mobile-first)
   Breakpoints live in responsive.css, motion in animations.css.
   ========================================================================== */

/* ---------- Fonts (self-hosted, see assets/fonts) ---------- */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/dm-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/dm-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/instrument-serif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/instrument-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/instrument-serif-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/instrument-serif-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Design tokens ---------- */
:root {
  /* Colour (hex fallbacks, refined with oklch below) */
  --color-background: #f8f7f4;
  --color-foreground: #0e0e0e;
  --color-muted: #e4e4e2;
  --color-muted-foreground: #585858;
  --color-border: #c4c4c3;
  --color-ring: #2a2a2a;

  /* Typography */
  --font-sans: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --fs-micro: 0.5625rem;   /*  9px — indices, captions, copyright */
  --fs-label: 0.625rem;    /* 10px — nav, tabs, labels */
  --fs-small: 0.6875rem;   /* 11px — subtitle, filters */
  --fs-xs: 0.75rem;        /* 12px */
  --fs-sm: 0.875rem;       /* 14px */
  --fs-2xl: 1.5rem;        /* 24px */
  --fs-3xl: 1.875rem;      /* 30px */
  --fs-4xl: 2.25rem;       /* 36px */
  --fs-5xl: 3rem;          /* 48px */
  --fs-6xl: 3.75rem;       /* 60px */
  --fs-8xl: 6rem;          /* 96px */
  --fs-display: 9rem;      /* 144px */

  /* Layout */
  --gutter: 1.25rem;          /* page side padding: 20 / 40 / 56 */
  --gallery-gutter: 0.75rem;  /* gallery side padding: 12 / 24 / 32 */
  --gallery-gap: 6px;
  --header-height: 6rem;

  /* Motion */
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

@supports (color: oklch(0% 0 0)) {
  :root {
    --color-background: oklch(97.5% 0.003 90);
    --color-foreground: oklch(16% 0 0);
    --color-muted: oklch(92% 0.003 90);
    --color-muted-foreground: oklch(46% 0 0);
    --color-border: oklch(82% 0.002 90);
    --color-ring: oklch(28% 0 0);
  }
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid var(--color-border);
}

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

body {
  min-height: 100vh;
  background-color: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
ul, ol { list-style: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  background: transparent;
  border-radius: 0;
}
button { cursor: pointer; }

a, button, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 1px solid var(--color-ring); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--color-foreground);
  color: var(--color-background);
  font-size: var(--fs-xs);
}
.skip-link:focus { top: 1rem; }

.serif { font-family: var(--font-serif); font-weight: 400; }
.muted { color: var(--color-muted-foreground); }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

.container { padding-inline: var(--gutter); }

/* ---------- Icon button ---------- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  color: inherit;
  transition: background-color 0.2s, color 0.2s;
}
.icon-btn:hover { background-color: var(--color-muted); }
.icon-btn svg { width: 1rem; height: 1rem; pointer-events: none; flex-shrink: 0; }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  height: var(--header-height);
  padding: 1.5rem var(--gutter) 0;
}

.brand { display: block; }
.brand__name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
}
.brand__role {
  display: block;
  margin-top: 0.5rem;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--color-muted-foreground);
}

.main-nav { display: none; align-items: center; gap: 2.5rem; }

.nav-link {
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  transition: opacity 0.25s;
}
.nav-link:hover { opacity: 0.48; }

.main-nav .nav-link {
  position: relative;
  padding-bottom: 0.5rem;
  color: var(--color-muted-foreground);
}
.main-nav .nav-link[aria-current="page"] { color: var(--color-foreground); }
.main-nav .nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
}

.menu-toggle { margin-top: -0.75rem; }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 1.5rem var(--gutter);
  background: var(--color-background);
}
.mobile-menu[hidden] { display: none; }

.mobile-menu__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.mobile-menu__brand {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  margin-bottom: 3rem;
}
.mobile-menu__nav a {
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-serif);
  font-size: var(--fs-5xl);
  line-height: 1;
}
.mobile-menu__nav a[aria-current="page"] { font-style: italic; }
.mobile-menu__nav span {
  margin-right: 1.25rem;
  vertical-align: top;
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-style: normal;
  color: var(--color-muted-foreground);
}
.mobile-menu__foot {
  font-size: var(--fs-label);
  text-transform: uppercase;
  color: var(--color-muted-foreground);
}

/* ---------- Home: hero ---------- */
.hero-title {
  padding-top: 1rem;
  padding-bottom: 2.5rem;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.05;
}

/* ---------- Home: category tabs ---------- */
.archive-tabs {
  display: flex;
  overflow-x: auto;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  border-block: 1px solid var(--color-border);
}

.archive-tab {
  position: relative;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  height: 3.5rem;
  padding-right: 2rem;
  text-align: left;
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--color-muted-foreground);
  transition: color 0.3s;
}
.archive-tab:hover,
.archive-tab[aria-selected="true"] { color: var(--color-foreground); }
.archive-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 1rem;
  bottom: -1px;
  height: 2px;
  background: var(--color-foreground);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.archive-tab[aria-selected="true"]::after { transform: scaleX(1); }
.archive-tab__num { margin-right: 0.5rem; font-size: var(--fs-micro); }
.archive-tab__label { white-space: nowrap; }

/* ---------- Home: project filters ---------- */
.project-filters {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  margin-inline: calc(var(--gutter) * -1);
  padding: 1.25rem var(--gutter);
}

.project-filter {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: var(--fs-small);
  white-space: nowrap;
  color: var(--color-muted-foreground);
  transition: color 0.25s, background-color 0.25s;
}
.project-filter:hover { color: var(--color-foreground); }
.project-filter[aria-pressed="true"] {
  background: var(--color-foreground);
  color: var(--color-background);
}

/* ---------- Home: justified gallery ---------- */
.gallery {
  display: flex;
  flex-direction: column;
  gap: var(--gallery-gap);
  padding: 0 var(--gallery-gutter) 1.5rem;
}
.gallery__row { display: flex; gap: var(--gallery-gap); }

.gallery__item {
  display: block;
  flex-basis: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--color-muted);
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out), opacity 0.5s;
}
.gallery__item:hover img,
.gallery__item:focus-visible img { transform: scale(1.02); }
.gallery__item:focus-visible { outline-offset: -1px; }

.gallery__item { position: relative; }
.gallery__item video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.gallery__item:hover video,
.gallery__item:focus-visible video { transform: scale(1.02); }
/* Small play mark so videos read as motion work at a glance. */
.gallery__play {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent var(--color-background);
  filter: drop-shadow(0 0 3px rgb(0 0 0 / 0.45));
  pointer-events: none;
}
.gallery__empty {
  padding: 4rem 0;
  font-size: var(--fs-small);
  color: var(--color-muted-foreground);
  text-align: center;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--color-foreground);
  color: var(--color-background);
}
.lightbox[hidden] { display: none; }
.lightbox__img {
  max-width: 86vw;
  max-height: 88vh;
  max-height: 88dvh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox .icon-btn { position: absolute; }
.lightbox .icon-btn:hover { background-color: rgb(255 255 255 / 0.1); }
.lightbox__close { top: 0.75rem; right: 0.75rem; }
.lightbox__prev { left: 0.5rem; }
.lightbox__next { right: 0.5rem; }
.lightbox__counter {
  position: absolute;
  bottom: 1.25rem;
  font-size: var(--fs-label);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 6rem;
  padding: 2.5rem var(--gutter);
  border-top: 1px solid var(--color-border);
}
.site-footer__grid { display: grid; gap: 3.5rem; }
.site-footer__name { font-size: 0.875rem; font-weight: 600; }
.site-footer__role {
  margin-top: 0.5rem;
  font-size: var(--fs-small);
  color: var(--color-muted-foreground);
}
.site-footer__tagline {
  max-width: 20rem;
  margin-top: 2.5rem;
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  line-height: 1.25;
}
.site-footer__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  font-size: var(--fs-label);
  font-weight: 500;
  text-transform: uppercase;
}
.site-footer__links ul {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}
.site-footer__links li { display: flex; }
.site-footer__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: var(--fs-micro);
  text-transform: uppercase;
  color: var(--color-muted-foreground);
}
.site-footer__bottom .icon-btn { color: var(--color-foreground); }

/* ---------- Inner pages (bio / contact) ---------- */
.page { padding: 0.25rem var(--gutter) 0; }

.eyebrow {
  font-size: var(--fs-label);
  text-transform: uppercase;
  color: var(--color-muted-foreground);
}

.display-title {
  font-family: var(--font-serif);
  font-size: var(--fs-6xl);
  font-weight: 400;
  line-height: 0.9;
}

.grid-12 { display: grid; }

/* Bio */
.bio-header { gap: 1.5rem; padding-bottom: 2.5rem; }
.bio-header__role { margin-top: 1.5rem; font-size: var(--fs-xs); line-height: 1rem; }

.bio-body { gap: 3rem; }
.bio-figure img { width: 100%; }
.bio-figure figcaption {
  margin-top: 0.75rem;
  font-size: var(--fs-micro);
  text-transform: uppercase;
  color: var(--color-muted-foreground);
}
.bio-lead {
  font-family: var(--font-serif);
  font-size: var(--fs-3xl);
  line-height: 1.25;
}
.bio-text {
  margin-top: 2rem;
  font-size: var(--fs-sm);
  line-height: 1.625;
  color: var(--color-muted-foreground);
}

.bio-sections {
  margin-top: 6rem;
  border-top: 1px solid var(--color-border);
}
.bio-section {
  gap: 1rem;
  padding-block: 2rem;
  border-bottom: 1px solid var(--color-border);
}
.bio-section__num { font-size: var(--fs-micro); color: var(--color-muted-foreground); }
.bio-section__title { font-size: var(--fs-label); font-weight: 500; }
.bio-section__text { max-width: 42rem; font-size: var(--fs-sm); line-height: 1.625; }

/* Contact */
.contact-header {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
}
.contact-header .eyebrow { margin-bottom: 1.75rem; }
.contact-header .display-title { line-height: 0.88; }

.contact-body { gap: 4rem; padding-top: 3rem; }

.contact-aside__name { font-size: var(--fs-sm); font-weight: 600; line-height: 1.25rem; }
.contact-aside__role {
  margin-top: 0.5rem;
  font-size: var(--fs-xs);
  line-height: 1rem;
  color: var(--color-muted-foreground);
}
.contact-details { margin-top: 3rem; font-size: var(--fs-xs); line-height: 1.3333; }
.contact-details > div + div { margin-top: 1.75rem; }
.contact-details dt {
  font-size: var(--fs-micro);
  text-transform: uppercase;
  color: var(--color-muted-foreground);
}
.contact-details dd { margin-top: 0.5rem; }
.contact-details a { transition: opacity 0.25s; }
.contact-details a:hover { opacity: 0.48; }
.contact-social {
  display: flex;
  gap: 1.25rem;
  margin-top: 3rem;
  text-transform: uppercase;
}

.inquiry {
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-border);
}
.inquiry .eyebrow { margin-bottom: 3rem; }

.form > * + * { margin-top: 2.5rem; }
.form__grid { display: grid; gap: 2.5rem; }
.form__field { display: block; }
.form-label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: var(--fs-label);
  text-transform: uppercase;
  color: var(--color-muted-foreground);
}
.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0 0.85rem;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--color-foreground);
  background: transparent;
  transition: border-color 0.25s;
}
.form-control:focus { outline: none; border-color: var(--color-foreground); }
.form-control[aria-invalid="true"] { border-color: var(--color-foreground); }
.form-control::placeholder { color: var(--color-muted-foreground); opacity: 1; }
textarea.form-control { display: inline-block; resize: none; }
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230e0e0e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.25rem center;
  cursor: pointer;
}
select.form-control:invalid { color: var(--color-foreground); }

.form__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}
.form__submit {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-foreground);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: opacity 0.25s;
}
.form__submit:hover { opacity: 0.6; }
.form__status {
  max-width: 28rem;
  font-size: var(--fs-label);
  color: var(--color-muted-foreground);
}
