/* Portfolio of Mehmet Eren Özdemir. Static, no build step. The violet comes from the owner's CV (#8a4fbf) so CV and site read as one. */
:root {
  --paper: #f7f6fa;
  --ink: #1f1a2b;
  --muted: #5f5a6b;
  --violet: #6b37a6;
  --rule: #8a4fbf;
  --land: #e4dfee;
  --panel: #efecf5;
  --measure: 68ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15121c;
    --ink: #ece8f4;
    --muted: #a7a1b5;
    --violet: #c39cf0;
    --rule: #9b6ad0;
    --land: #2b2537;
    --panel: #1d1926;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 'Schibsted Grotesk', system-ui, sans-serif;
  font-feature-settings: 'ss01';
}
a {
  color: var(--violet);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 2px;
}

/* language: both texts are in the page, the switch hides one */
html[data-lang='en'] [data-l='tr'],
html[data-lang='tr'] [data-l='en'] {
  display: none !important;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 560px) {
  .wrap {
    padding: 0 16px;
  }
}

/* top bar */
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  font-size: 0.9375rem;
}
.bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}
.bar nav a {
  color: var(--ink);
  text-decoration: none;
}
.bar nav a:hover {
  color: var(--violet);
}
.lang {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  overflow: hidden;
  flex: none;
}
.lang button {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 4px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.lang button[aria-pressed='true'] {
  background: var(--rule);
  color: #fff;
}
@media (max-width: 720px) {
  .bar nav {
    display: none;
  }
}

/* hero */
.hero {
  padding: 56px 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 40px;
  align-items: end;
}
.portrait {
  display: block;
  width: 220px;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  /* the violet rule of the CV, as an offset frame */
  box-shadow: 8px 8px 0 var(--rule);
  margin: 0 8px 8px 0;
}
@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 28px;
  }
  .portrait {
    order: -1;
    width: 120px;
  }
}
.hero h1 {
  font-size: clamp(2.75rem, 8.4vw, 6.25rem);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0;
}
.hero h1 span {
  display: block;
}
.hero .role {
  margin: 24px 0 0;
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  font-weight: 600;
}
.hero .lede {
  max-width: var(--measure);
  margin: 12px 0 0;
  color: var(--muted);
}
.hero .where {
  margin: 20px 0 0;
  font-weight: 500;
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}
.links a {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}
.links a:hover {
  background: var(--rule);
  color: #fff;
}

/* sections: a violet rule above the title, as on the CV */
section {
  padding: 48px 0 8px;
}
section > h2 {
  font-size: 1.625rem;
  letter-spacing: -0.015em;
  font-weight: 700;
  margin: 0 0 6px;
  padding-top: 14px;
  border-top: 2px solid var(--rule);
}
section > .intro {
  max-width: var(--measure);
  color: var(--muted);
  margin: 0 0 24px;
}

/* the map: the one memorable thing on the page */
.map {
  margin: 8px 0 0;
}
.map svg {
  display: block;
  width: 100%;
  height: auto;
}
.map .land {
  fill: var(--land);
}
.map .route {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.map .city {
  fill: var(--paper);
  stroke: var(--violet);
  stroke-width: 2.5;
}
.map .home {
  fill: var(--violet);
}
.map text {
  font: 600 15px 'Schibsted Grotesk', system-ui, sans-serif;
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 4px;
  stroke-linejoin: round;
}
/* on a phone the map is ~360px wide: bigger labels and dots so they stay readable */
@media (max-width: 600px) {
  .map text {
    font-size: 30px;
    stroke-width: 7px;
  }
  .map .city,
  .map .home {
    r: 10px;
  }
  .map .route {
    stroke-width: 3;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .map .route {
    /* each route has pathLength="1", so one unit is the whole line */
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: fly 1.6s cubic-bezier(0.45, 0, 0.2, 1) forwards;
  }
  .map .route:nth-of-type(2) { animation-delay: 0.25s; }
  .map .route:nth-of-type(3) { animation-delay: 0.5s; }
  .map .route:nth-of-type(4) { animation-delay: 0.75s; }
}
@keyframes fly {
  to {
    stroke-dashoffset: 0;
  }
}
.places {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 4px 24px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.places li {
  padding: 10px 0;
  border-bottom: 1px solid var(--land);
}
.places b {
  display: block;
  font-weight: 700;
}
.places span {
  color: var(--muted);
  font-size: 0.9375rem;
}
.note {
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: var(--measure);
}

/* photos: columns keep each picture's own proportions (portrait and landscape mixed) */
.photos {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  columns: 3 250px;
  column-gap: 20px;
}
.photos li {
  break-inside: avoid;
  margin: 0 0 20px;
}
.photos figure {
  margin: 0;
}
.photos img,
.teach img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--panel);
}
.photos figcaption {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--muted);
}
.photos figcaption b {
  color: var(--ink);
}

/* teaching */
.teach {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;
  gap: 8px 40px;
  align-items: start;
  padding: 8px 0 8px;
}
.teach h3 {
  margin: 0 0 8px;
  font-size: 1.1875rem;
}
.teach p {
  max-width: var(--measure);
  margin: 0 0 8px;
}
@media (max-width: 720px) {
  .teach {
    grid-template-columns: 1fr;
  }
}

/* experience */
.jobs {
  list-style: none;
  margin: 0;
  padding: 0;
}
.jobs > li {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--land);
}
.jobs > li:last-child {
  border-bottom: 0;
}
.when {
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}
.jobs h3 {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
}
.jobs h3 small {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.9375rem;
}
.jobs ul {
  margin: 8px 0 0;
  padding-left: 1.1em;
  max-width: var(--measure);
}
.jobs ul li {
  margin: 6px 0;
}
.jobs ul li::marker {
  color: var(--rule);
}
@media (max-width: 720px) {
  .jobs > li {
    grid-template-columns: 1fr;
  }
}

/* case studies */
.case {
  padding: 28px 0 32px;
  border-bottom: 1px solid var(--land);
}
.case:last-of-type {
  border-bottom: 0;
}
.case h3 {
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  margin: 0;
}
.case .sub {
  margin: 4px 0 0;
  color: var(--muted);
}
.case p,
.case ul {
  max-width: var(--measure);
}
.case h4 {
  font-size: 1rem;
  margin: 22px 0 6px;
}
.case ul {
  padding-left: 1.1em;
}
.case ul li::marker {
  color: var(--rule);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
}

/* architecture: a chain of steps, left to right on wide screens, top to bottom on phones */
.flow {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 28px;
}
.flow li {
  position: relative;
  background: var(--panel);
  border-top: 3px solid var(--rule);
  padding: 12px 14px 14px;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.flow li b {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}
.flow li > span {
  color: var(--muted);
}
.flow li + li::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 26px;
  width: 20px;
  border-top: 2px solid var(--rule);
}
.flow li + li::after {
  content: '';
  position: absolute;
  left: -8px;
  top: 21px;
  border: 6px solid transparent;
  border-left-color: var(--rule);
}
@media (max-width: 820px) {
  .flow {
    grid-auto-flow: row;
    gap: 22px;
  }
  .flow li + li::before {
    left: 26px;
    top: -20px;
    width: 0;
    height: 16px;
    border-top: 0;
    border-left: 2px solid var(--rule);
  }
  .flow li + li::after {
    left: 21px;
    top: -8px;
    border-left-color: transparent;
    border-top-color: var(--rule);
  }
}

/* writing and projects */
.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rows li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--land);
}
.rows a.title {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ink);
  text-decoration: none;
}
.rows a.title:hover {
  color: var(--violet);
  text-decoration: underline;
}
.rows p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: var(--measure);
}
.rows .meta {
  color: var(--muted);
  font-size: 0.875rem;
  white-space: nowrap;
}
section h3.small {
  font-size: 1.0625rem;
  margin: 32px 0 4px;
}

/* skills and credentials */
.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 40px;
}
.cols h3 {
  font-size: 1rem;
  margin: 12px 0 6px;
}
.cols ul {
  margin: 0;
  padding-left: 1.1em;
}
.cols li::marker {
  color: var(--rule);
}
/* technologies: one card per tool, grouped by area. HR asks about tools first, so this sits right under the intro. */
.tech-group {
  margin-top: 28px;
}
.tech-group h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 1.0625rem;
}
.tech-group .count {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--violet);
}
.tech-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.tech {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--land);
  border-radius: 10px;
  background: var(--paper);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.tech:hover {
  border-color: var(--rule);
  background: var(--panel);
}
.tech .mono {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--panel);
  color: var(--violet);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.tech:hover .mono {
  background: var(--paper);
}
.tech .t-name {
  align-self: end;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: break-word;
}
.tech .t-where {
  align-self: start;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--muted);
}
.tech:not(:has(.t-where)) .t-name {
  grid-row: 1 / span 2;
  align-self: center;
}
@media (max-width: 420px) {
  .tech-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .tech {
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 8px;
    padding: 8px;
  }
  .tech .mono {
    width: 34px;
    height: 34px;
    font-size: 0.6875rem;
  }
  .tech .t-name {
    font-size: 0.8125rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tech {
    transition: none;
  }
}

footer {
  margin-top: 56px;
  padding: 32px 0 48px;
  border-top: 2px solid var(--rule);
}
footer h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
  margin: 0;
}
footer p {
  color: var(--muted);
  max-width: var(--measure);
}
footer .small {
  font-size: 0.8125rem;
  margin-top: 32px;
}

@media print {
  .bar,
  .lang {
    display: none;
  }
  .map .route {
    animation: none;
    stroke-dashoffset: 0;
  }
}
