:root {
  --ink: #0f041a;
  --paper: #f4f8fc;
  --line: rgba(15, 4, 26, 0.42);
  --rail: clamp(5rem, 10.5vw, 10rem);
  --pad: clamp(1.4rem, 6vw, 6rem);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: linear-gradient(rgba(15, 4, 26, 0.025) 1px, transparent 1px);
  background-size: 100% 2rem;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img { max-width: 100%; }
::selection { color: var(--paper); background: var(--ink); }

.sidebar {
  position: fixed; z-index: 20; inset: 0 auto 0 0; width: var(--rail); padding: 2.5rem 1.25rem;
  display: flex; flex-direction: column; align-items: center; color: var(--paper); background: var(--ink);
}
.monogram { position: relative; height: 5rem; font-family: Georgia, serif; font-size: clamp(2rem, 3.4vw, 3.5rem); line-height: 1; }
.monogram span { position: absolute; left: 0.43em; top: 0.28em; font-size: 0.74em; }
.sidebar nav { width: 100%; margin: auto 0; }
.sidebar nav a { position: relative; display: block; padding: 0.8rem 0 0.9rem clamp(0.6rem, 1.5vw, 1.4rem); border-left: 1px solid rgba(244, 248, 252, 0.34); }
.sidebar nav a::before { content: ""; position: absolute; left: -1px; top: 0; width: 2px; height: 0; background: var(--paper); transition: height 0.3s; }
.sidebar nav a:hover::before, .sidebar nav a.active::before { height: 100%; }
.sidebar nav small, .sidebar nav span { display: block; font-size: clamp(0.54rem, 0.72vw, 0.68rem); }
.sidebar nav small { margin-bottom: 0.35rem; opacity: 0.62; }
.sidebar-foot { display: grid; gap: 1rem; text-align: center; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; }
.sidebar-foot a { font-size: 0.7rem; transition: opacity 0.2s; }
.sidebar-foot a:last-child { font-size: 1.05rem; }
.sidebar-foot a:hover { opacity: 0.55; }

main { margin-left: var(--rail); overflow: hidden; }
.section { padding-inline: var(--pad); }
.top-meta { grid-column: 1 / -1; display: flex; justify-content: space-between; margin-bottom: 3rem; }
.top-meta p { margin: 0; font-size: clamp(0.55rem, 0.8vw, 0.75rem); font-weight: 700; line-height: 1.45; letter-spacing: 0.14em; }
.top-meta p:last-child { padding-right: 10%; }
.section-rule { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.25rem; height: 1.5rem; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; }
.section-rule i { display: block; height: 1px; background: var(--line); }
.section-rule b { font-size: inherit; }

.hero { min-height: 100vh; padding-top: 3.2rem; padding-bottom: 4rem; display: grid; grid-template-columns: 5fr 7fr; gap: 0 2.2rem; }
.hero > .section-rule { grid-column: 1; align-self: start; }
.hero-copy { grid-column: 1; padding-top: 2.2rem; align-self: stretch; display: flex; flex-direction: column; align-items: flex-start; }
.hero h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(4.2rem, 8.5vw, 9.3rem); font-weight: 400; line-height: 0.78; letter-spacing: -0.065em; }
.hero-copy > p { max-width: 22rem; margin: 2rem 0; font-size: clamp(0.95rem, 1.35vw, 1.25rem); line-height: 1.45; }
.hero-copy > a { margin-top: auto; padding-bottom: 0.4rem; border-bottom: 1px solid var(--ink); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em; }
.hero-copy > a b { margin-left: 2.5rem; font-size: 1.25rem; font-weight: 400; }
.hero-visual { grid-column: 2; grid-row: 2 / 4; position: relative; min-height: 44rem; margin: 0; overflow: hidden; background: #ccc; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.2); transform: scale(1.06); }
.hero-visual figcaption { position: absolute; inset: 2rem; display: flex; justify-content: space-between; align-items: flex-start; color: white; font-size: 0.62rem; font-weight: 700; line-height: 1.35; letter-spacing: 0.18em; }

.about { min-height: 45rem; padding-top: 50px; padding-left: 0; display: grid; grid-template-columns: 6fr 7fr; }
.about-visual { margin: 0; min-height: 42rem; overflow: hidden; background: var(--ink); }
.about-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 56% center; filter: grayscale(1) contrast(1.25); transform: scale(1.08); }
.about-content { padding: 0 0 4rem 2.2rem; }
.about-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; padding-top: 2rem; }
.about h2 { margin: 0 0 2.4rem; font-family: Georgia, serif; font-size: clamp(3.2rem, 6vw, 6rem); font-weight: 400; line-height: 0.9; letter-spacing: -0.055em; }
.about h2 em { font-weight: 400; }
.about-grid > div > p { max-width: 30rem; font-size: 0.88rem; line-height: 1.55; }
.portrait-card { display: flex; flex-direction: column; justify-content: space-between; }
.portrait-photo { width: 100%; aspect-ratio: 0.82; display: block; object-fit: cover; object-position: center 28%; filter: grayscale(1) contrast(1.06); background: var(--ink); }
.portrait-card p { font-size: 0.65rem !important; line-height: 1.55 !important; letter-spacing: 0.12em; }

.motto { padding-top: 4rem; padding-bottom: 4rem; }
.motto-grid { position: relative; min-height: 28rem; display: grid; grid-template-columns: 7fr 2fr 3fr; align-items: center; }
blockquote { margin: 0; font-family: Georgia, serif; font-size: clamp(3.7rem, 7.2vw, 7.5rem); line-height: 0.8; letter-spacing: -0.05em; }
blockquote em { font-weight: 400; }
.motto-grid > p { position: relative; z-index: 2; font-size: 0.85rem; line-height: 1.55; }
.ghost-letter { position: absolute; z-index: 0; right: 4%; bottom: -8%; color: rgba(15, 4, 26, 0.035); font-family: Georgia, serif; font-size: 28rem; line-height: 1; }

.skills { padding-top: 1rem; padding-bottom: 5rem; }
.skill-grid { width: min(100%, 70rem); margin: 2.5rem auto 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 3rem); border: 0; }
.skill-grid article { min-height: 8rem; padding: 1.4rem 1rem; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 0.85rem; border: 0; text-align: left; }
.skill-grid article strong { font-size: 1.8rem; letter-spacing: -0.08em; }
.skill-grid article span { font-size: 0.62rem; line-height: 1.25; }
.skills-dark { padding-top: 0; color: var(--paper); background: var(--ink); }
.skills-label { margin-top: 5rem; padding-top: 0.8rem; border-top: 1px solid rgba(244, 248, 252, 0.35); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; }

.expertise { padding-top: 6rem; padding-bottom: 6rem; color: var(--paper); background: var(--ink); }
.expertise .section-rule i { background: rgba(244, 248, 252, 0.4); }
.expertise-intro { display: grid; grid-template-columns: 4fr 8fr; gap: 2rem; align-items: end; padding: 4rem 0 5rem; }
.expertise-intro > p { max-width: 25rem; margin: 0; font-size: 0.9rem; line-height: 1.6; }
.expertise-intro h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(4rem, 8vw, 9rem); font-weight: 400; line-height: 0.82; letter-spacing: -0.06em; }
.expertise-intro h2 em { font-weight: 400; }
.expertise-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(244, 248, 252, 0.35); border-left: 1px solid rgba(244, 248, 252, 0.35); }
.expertise-grid article { min-height: 31rem; padding: 1.4rem; display: flex; flex-direction: column; border-right: 1px solid rgba(244, 248, 252, 0.35); border-bottom: 1px solid rgba(244, 248, 252, 0.35); transition: color 0.3s, background 0.3s; }
.expertise-grid article:hover { color: var(--ink); background: var(--paper); }
.expertise-grid article > span { font-size: 0.62rem; letter-spacing: 0.14em; opacity: 0.65; }
.expertise-grid h3 { margin: 3rem 0 1.5rem; font-family: Georgia, serif; font-size: clamp(1.8rem, 2.7vw, 3rem); font-weight: 400; line-height: 0.92; }
.expertise-grid p { margin: 0; font-size: 0.78rem; line-height: 1.58; }
.expertise-grid ul { margin: auto 0 0; padding: 1.2rem 0 0; list-style: none; border-top: 1px solid currentColor; }
.expertise-grid li { padding: 0.25rem 0; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; }

.projects { padding-top: 5rem; padding-bottom: 6rem; background: #eceff2; }
.project-list { transition: opacity .35s ease; }
.project-list.is-loading { opacity: 0; }
.project-list {
  margin-top: 2.5rem;
  columns: 5;
  column-gap: clamp(0.55rem, 1vw, 1rem);
}
.project {
  position: relative;
  width: 100%;
  margin: 0 0 clamp(0.55rem, 1vw, 1rem);
  padding: 0;
  display: inline-block;
  break-inside: avoid;
  border: 0;
  background: transparent;
  text-align: left;
  vertical-align: top;
  cursor: pointer;
}
.project .number {
  position: absolute;
  z-index: 4;
  top: 1rem;
  left: 1rem;
  min-width: 2.2rem;
  padding: 0.5rem;
  color: var(--paper);
  border: 1px solid rgba(244, 248, 252, 0.6);
  background: rgba(15, 4, 26, 0.2);
  backdrop-filter: blur(8px);
  font-size: 0.6rem;
  text-align: center;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(-0.5rem);
  transition: opacity 0.3s, transform 0.3s;
}
.project-image {
  display: block;
  height: auto;
  overflow: hidden;
  background: var(--ink);
}
.project-image img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(0.15) contrast(1.03);
  transition: filter 0.45s, transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.project.cover-portrait .project-image { aspect-ratio: 4 / 5; }
.project.cover-square .project-image { aspect-ratio: 1 / 1; }
.project.cover-landscape .project-image { aspect-ratio: 16 / 9; }
.project.cover-portrait .project-image img,
.project.cover-square .project-image img,
.project.cover-landscape .project-image img { height: 100%; object-fit: cover; }
.project:hover img,
.project:focus-visible img { filter: grayscale(0) brightness(0.54); transform: scale(1.045); }
.project-info {
  position: absolute;
  z-index: 3;
  inset: 0;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0.55rem;
  color: var(--paper);
  background: linear-gradient(to top, rgba(15, 4, 26, 0.92), rgba(15, 4, 26, 0.05) 68%);
  opacity: 0;
  transition: opacity 0.35s;
}
.project-info b, .project-info small { display: block; }
.project-info b {
  font-family: Georgia, serif;
  font-size: clamp(1.35rem, 2vw, 2.25rem);
  font-weight: 400;
  line-height: 1;
}
.project-info small {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.project > i {
  position: absolute;
  z-index: 4;
  right: 0;
  top: 0;
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--paper);
  font-size: 1.5rem;
  font-style: normal;
  opacity: 0;
  transform: translate(0.5rem, -0.5rem);
  transition: opacity 0.3s, transform 0.3s;
}
.project:hover .project-info,
.project:hover .number,
.project:hover > i,
.project:focus-visible .project-info,
.project:focus-visible .number,
.project:focus-visible > i { opacity: 1; transform: none; }
.project:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.contact { padding-top: 5rem; padding-bottom: 6rem; color: var(--paper); background: var(--ink); }
.contact .section-rule i { background: rgba(244, 248, 252, 0.4); }
.contact > p { margin: 5rem 0 1rem; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; }
.contact-title { display: block; padding-bottom: 2rem; border-bottom: 1px solid rgba(244, 248, 252, 0.4); font-family: Georgia, serif; font-size: clamp(4rem, 9vw, 10rem); line-height: 0.82; letter-spacing: -0.06em; }
.contact-title em { font-weight: 400; }
.contact-meta { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; padding-top: 2rem; font-size: 0.72rem; }
.contact-meta a:hover { text-decoration: underline; text-underline-offset: 0.3rem; }

.project-modal { width: min(92vw, 1450px); max-height: 92vh; padding: 0; border: 0; color: var(--paper); background: var(--ink); }
.project-modal::backdrop { background: rgba(15, 4, 26, 0.92); }
.project-modal > div { position: sticky; top: 0; z-index: 2; padding: 1rem 1.3rem; display: flex; justify-content: space-between; background: var(--ink); }
.project-modal p { margin: 0; font-size: 0.7rem; letter-spacing: 0.12em; }
.project-modal button { border: 0; color: var(--paper); background: transparent; cursor: pointer; }
.project-modal > img { width: 100%; display: block; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s, transform 0.7s; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1200px) {
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .project-list { columns: 3; }
}

@media (max-width: 900px) {
  :root { --rail: 4.2rem; }
  .sidebar nav span { display: none; }
  .sidebar nav a { padding-left: 0.5rem; }
  .hero { grid-template-columns: 1fr; }
  .hero > .section-rule, .hero-copy, .hero-visual { grid-column: 1; }
  .hero-visual { grid-row: auto; margin-top: 3rem; min-height: 34rem; }
  .hero-copy > a { margin-top: 2rem; }
  .about { grid-template-columns: 1fr; padding-right: var(--pad); }
  .about-visual { min-height: 28rem; }
  .about-content { padding: 3rem 0; }
  .motto-grid { grid-template-columns: 1fr; gap: 2rem; }
  .motto-grid > p { max-width: 15rem; margin-left: auto; }
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
  .expertise-intro { grid-template-columns: 1fr; }
  .project-list { columns: 2; }
}

@media (max-width: 620px) {
  :root { --rail: 0rem; --pad: 1.2rem; }
  .sidebar { position: sticky; top: 0; width: 100%; height: 3.8rem; padding: 0 1.2rem; flex-direction: row; justify-content: space-between; }
  .monogram { height: auto; font-size: 1.8rem; }
  .sidebar nav { width: auto; margin: 0; display: flex; }
  .sidebar nav a { padding: 0.5rem; border: 0; }
  .sidebar nav a::before, .sidebar nav small, .sidebar-foot { display: none; }
  .sidebar nav span { display: block; font-size: 0.52rem; }
  main { margin-left: 0; }
  .top-meta p:last-child { display: none; }
  .hero { min-height: auto; padding-top: 2rem; }
  .hero h1 { font-size: 21vw; }
  .hero-visual { min-height: 25rem; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait-card { display: none; }
  .motto-grid { min-height: 23rem; }
  blockquote { font-size: 16vw; }
  .expertise-grid { grid-template-columns: 1fr; }
  .expertise-grid article { min-height: 25rem; }
  .project-list { columns: 1; }
  .contact-meta { grid-template-columns: 1fr; }
}

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

@media (hover: none) {
  .project .project-info {
    inset: auto 0 0;
    min-height: 38%;
    opacity: 1;
  }
  .project .number { opacity: 1; transform: none; }
  .project > i { opacity: 1; transform: none; }
}

/* Ana sayfa: öne çıkan projeler + tüm projeler bağlantısı */
.all-projects { margin-top: 2.5rem; padding: 1.4rem 0; display: flex; align-items: center; gap: 1.2rem; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; transition: padding 0.3s; }
.all-projects b { font-family: Georgia, serif; font-size: 0.9rem; font-weight: 400; letter-spacing: 0; opacity: 0.55; }
.all-projects i { margin-left: auto; font-size: 1.6rem; font-style: normal; font-weight: 400; transition: transform 0.3s; }
.all-projects:hover { padding-inline: 1rem; }
.all-projects:hover i { transform: translateX(0.4rem); }
/* Masonry (masonry.js): kartlar soldan sağa sırayla en kısa sütuna yerleşir. */
.project-list.is-masonry { columns: auto; display: flex; align-items: flex-start; gap: clamp(0.55rem, 1vw, 1rem); }
.project-list .masonry-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: clamp(0.55rem, 1vw, 1rem); }
.project-list .masonry-col > .project { display: block; margin: 0; }

/* Çerez izin bandı */
.cookie-consent {
  position: fixed; z-index: 60; left: calc(var(--rail) + 1.5rem); right: 1.5rem; bottom: 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  max-width: 60rem; margin-inline: auto; padding: 1.4rem 1.6rem;
  color: var(--paper); background: var(--ink); box-shadow: 0 1.2rem 3rem rgba(15, 4, 26, 0.28);
  opacity: 0; transform: translateY(1.5rem); transition: opacity 0.35s, transform 0.35s;
}
.cookie-consent.is-open { opacity: 1; transform: none; }
.cookie-consent-text b { display: block; margin-bottom: 0.45rem; font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; }
.cookie-consent-text p { margin: 0; max-width: 38rem; font-size: 0.82rem; line-height: 1.5; opacity: 0.82; }
.cookie-consent-actions { display: flex; flex-shrink: 0; gap: 0.6rem; }
.cookie-consent-actions button {
  padding: 0.75rem 1.1rem; border: 1px solid rgba(244, 248, 252, 0.5); background: transparent; cursor: pointer;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; transition: background 0.2s, color 0.2s;
}
.cookie-consent-actions [data-consent="all"] { color: var(--ink); background: var(--paper); border-color: var(--paper); }
.cookie-consent-actions button:hover { background: #fff; }
.cookie-consent-actions button:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

@media (max-width: 760px) {
  .cookie-consent { flex-direction: column; align-items: stretch; gap: 1.1rem; left: calc(var(--rail) + 1rem); right: 1rem; bottom: 1rem; }
  .cookie-consent-actions button { flex: 1; }
}
@media (max-width: 620px) {
  .cookie-consent { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; padding: 1.2rem; }
}
