/* Berkay Geldeç — Portfolio
   Brand: paper, ink and one ultramarine dot. Instrument Serif for display,
   Geist for text, Geist Mono for labels. */


:root {
  --paper: #F3EFE7;
  --ink: #14110F;
  --accent: #2B3AFF;
  --mute: #6F6860;
  --line: #DDD6CA;
  --card: #E9E3D8;
  --night: #0F0D0C;
  --night-ink: #F3EFE7;
  --night-mute: #9C958B;
  --night-line: #2A2622;
  --night-accent: #8E97FF;

  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --max: 1320px;
  --gutter: clamp(20px, 4.5vw, 64px);
  --section-y: clamp(72px, 11vh, 136px);
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F0D0C;
    --ink: #F3EFE7;
    --accent: #8E97FF;
    --mute: #A39C92;
    --line: #2A2622;
    --card: #1A1714;
  }
}

/* Base
   ------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100% }
a { color: inherit; text-decoration: none }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; padding: 0 }
ol, ul { list-style: none }
em { font-style: italic }
::selection { background: var(--accent); color: var(--paper) }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; font: 500 14px var(--font-sans) }
.skip-link:focus { top: 16px }

.dot { color: var(--accent) }
.label {
  font: 500 12px/1.4 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute);
}
.rule { height: 1px; border: 0; background: var(--line); margin: 0 }

/* Header
   ------------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.is-scrolled .site-header { border-bottom-color: var(--line) }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px }
.brand { display: flex; align-items: center; color: var(--ink) }
.brand svg { height: 30px; width: auto }
.brand .logo-dot { fill: var(--accent) }
.brand__mark { display: none }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 36px) }
.nav a { font: 500 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); transition: color .2s }
.nav a:hover { color: var(--ink) }
.lang-switch { display: inline-flex; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px }
.lang-switch [aria-current] { color: var(--ink) }

/* Hero
   ------------------------------------------------------------------------ */
.hero { padding: clamp(40px, 8vh, 96px) 0 clamp(48px, 8vh, 88px) }
.hero__top { display: flex; justify-content: space-between; align-items: center; gap: 24px }
.status { display: inline-flex; align-items: center; gap: 10px }
.status__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent) }
.js .status__dot::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--accent);
  opacity: 0; animation: ping 2.8s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(.4); opacity: .7 } 70%, 100% { transform: scale(1.6); opacity: 0 } }

.name {
  margin-top: clamp(28px, 5vh, 56px);
  font-size: clamp(64px, 12.6vw, 184px);
  line-height: .9;
  letter-spacing: -.035em;
  font-weight: 500;
  display: flex; flex-wrap: wrap; column-gap: .22em;
}
.name__first { font-family: var(--font-sans); font-weight: 500 }
.name__last { font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: -.01em; font-size: 1.1em; line-height: .82 }

.hero__grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 96px); margin-top: clamp(56px, 9vh, 104px); align-items: start;
}
.hero__grid > div:first-child { padding-top: clamp(0px, 2vw, 24px) }
.lead { font: 400 clamp(30px, 3.3vw, 46px)/1.08 var(--font-display); letter-spacing: -.01em; max-width: 18ch }
.body { margin-top: 24px; max-width: 58ch; color: color-mix(in srgb, var(--ink) 78%, var(--paper)) }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px }

.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 24px;
  border-radius: 999px; font: 500 15px/1 var(--font-sans); border: 1px solid var(--ink);
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { transform: translateY(-1px) }
.btn--solid { background: var(--ink); color: var(--paper) }
.btn--solid:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent)) }
.btn--ghost:hover { background: var(--ink); color: var(--paper) }
.btn__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent) }

.portrait { margin: 0 }
.portrait__img { aspect-ratio: 4 / 5; width: 100%; height: auto; object-fit: cover; border-radius: 6px; background: var(--card) }
.portrait figcaption { display: flex; justify-content: space-between; margin-top: 14px }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line) }
.stat { padding: 22px 24px 4px 0 }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line) }
.stat__value { font: 400 clamp(30px, 2.8vw, 40px)/1 var(--font-display); letter-spacing: -.01em }
.stat__value small { font: 500 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-left: 6px }
.stat__text { margin-top: 8px }

/* Sections
   ------------------------------------------------------------------------ */
.section { padding: var(--section-y) 0; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px) }
.section__head { align-self: start; position: sticky; top: 112px }
.section__no { color: var(--accent) }
.section__title { margin-top: 12px; font: 400 clamp(40px, 4.4vw, 64px)/1 var(--font-display); letter-spacing: -.015em }
.section__note { margin-top: 18px; max-width: 34ch; color: var(--mute) }

/* Expertise */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--ink) }
.pillar { padding: 22px 28px 0 0 }
.pillar + .pillar { padding-left: 28px; border-left: 1px solid var(--line) }
.pillar__title { margin-top: 36px; font: 400 32px/1.05 var(--font-display); letter-spacing: -.01em }
.pillar__text { margin-top: 14px; font-size: 16px; color: color-mix(in srgb, var(--ink) 76%, var(--paper)) }

/* Experience */
.years { font: 400 clamp(110px, 12vw, 176px)/.85 var(--font-display); letter-spacing: -.03em; margin-top: 18px; display: flex; align-items: baseline; gap: 10px }
.years small { font: 500 13px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute) }
.exp { border-top: 1px solid var(--ink) }
.exp__item { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); position: relative }
.exp__item::before {
  content: ""; position: absolute; left: -22px; top: 34px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); opacity: 0; transform: scale(.4); transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.exp__item:hover::before, .exp__item:first-child::before { opacity: 1; transform: none }
.exp__date { padding-top: 5px }
.exp__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; align-items: baseline }
.exp__role { font: 500 19px/1.3 var(--font-sans); letter-spacing: -.01em }
.exp__org { font-size: 15px; color: var(--mute) }
.exp__desc { margin-top: 8px; font-size: 16px; color: color-mix(in srgb, var(--ink) 76%, var(--paper)); max-width: 62ch }

/* Clients marquee */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 30px 0 }
.marquee__track { display: flex; width: max-content }
.marquee__group { display: flex; align-items: center; flex-shrink: 0 }
.marquee__label { padding: 0 40px 0 var(--gutter); white-space: nowrap }
.marquee ul { display: flex; align-items: center }
.marquee li { font: 400 clamp(32px, 3.6vw, 52px)/1 var(--font-display); font-style: italic; white-space: nowrap; display: flex; align-items: center }
.marquee li::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin: 0 clamp(22px, 2.6vw, 40px) }
.marquee.is-animated .marquee__track { animation: marquee 70s linear infinite }
.marquee.is-animated:hover .marquee__track { animation-play-state: paused }
@keyframes marquee { to { transform: translateX(-50%) } }
.js .marquee:not(.is-animated) .marquee__track { width: auto }
.js .marquee:not(.is-animated) .marquee__group, html:not(.js) .marquee__group { flex-wrap: wrap; row-gap: 14px; padding: 0 var(--gutter) }
html:not(.js) .marquee__label, .js .marquee:not(.is-animated) .marquee__label { padding-left: 0 }

/* Technologies */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--ink) }
.skill { padding: 22px 28px 24px 0; border-bottom: 1px solid var(--line) }
.skill:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line) }
.skill dd { margin-top: 10px; font-size: 16px }

/* Education */
.edu { border-top: 1px solid var(--ink) }
.edu__item { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line) }
.edu__title { font: 400 28px/1.15 var(--font-display); letter-spacing: -.01em }
.edu__meta { white-space: nowrap }

/* FAQ */
.faq { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--ink) }
.faq__item { padding: 24px 28px 28px 0; border-bottom: 1px solid var(--line) }
.faq__item:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line) }
.faq__q { font: 400 26px/1.15 var(--font-display); letter-spacing: -.01em }
.faq__a { margin-top: 10px; font-size: 16px; color: color-mix(in srgb, var(--ink) 78%, var(--paper)) }
.faq__a a { border-bottom: 1px solid var(--line); transition: border-color .2s }
.faq__a a:hover { border-color: var(--accent) }

/* Contact — always dark
   ------------------------------------------------------------------------ */
.site-footer {
  --paper: var(--night); --ink: var(--night-ink); --mute: var(--night-mute); --line: var(--night-line); --accent: var(--night-accent);
  background: var(--paper); color: var(--ink); padding: clamp(80px, 13vh, 150px) 0 40px; margin-top: var(--section-y);
}
@media (prefers-color-scheme: dark) {
  .site-footer { --paper: #181513; border-top: 1px solid #2A2622 }
  .portrait__img { filter: brightness(.9) contrast(1.04) }
}
.contact__title { font: 400 clamp(52px, 7.4vw, 116px)/.95 var(--font-display); letter-spacing: -.02em; max-width: 13ch; margin-top: 18px }
.contact__title, .section__title, .lead, .not-found__title { text-wrap: balance }
.contact__note { margin-top: 26px; max-width: 52ch; font-size: 18px; color: var(--mute) }
.contact__row { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 48px; margin-top: clamp(48px, 8vh, 88px); align-items: end }
.contact__cta { display: inline-flex; align-items: center; gap: 18px; font: 400 clamp(26px, 2.6vw, 36px)/1.1 var(--font-display) }
.contact__cta img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover }
.contact__cta span { border-bottom: 1px solid var(--line); padding-bottom: 6px; transition: border-color .25s }
.contact__cta:hover span { border-color: var(--accent) }
.contact__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px }
.contact__meta dd { margin-top: 8px; font-size: 15px }
.contact__meta a { border-bottom: 1px solid var(--line); transition: border-color .2s }
.contact__meta a:hover { border-color: var(--accent) }
.contact__links { display: flex; gap: 14px; flex-wrap: wrap }
.colophon { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: clamp(64px, 10vh, 120px); padding-top: 22px; border-top: 1px solid var(--line) }
.colophon svg { height: 34px; width: auto; color: var(--ink) }
.colophon .logo-dot { fill: var(--accent) }

/* 404 */
.not-found { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 28px }
.not-found__title { font: 400 clamp(44px, 6vw, 88px)/1 var(--font-display); letter-spacing: -.02em; max-width: 16ch }
.not-found__links { display: flex; gap: 12px; flex-wrap: wrap }

/* Reveal
   ------------------------------------------------------------------------ */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease) }
.js [data-reveal].is-visible { opacity: 1; transform: none }
.js .name > span { display: inline-block; opacity: 0; transform: translateY(.25em); animation: rise 1s var(--ease) forwards }
.js .name__last { animation-delay: .12s !important }
@keyframes rise { to { opacity: 1; transform: none } }

/* Responsive
   ------------------------------------------------------------------------ */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; align-items: start }
  .portrait { max-width: 520px }
  .section { grid-template-columns: 1fr }
  .section__head { position: static }
  .pillars { grid-template-columns: 1fr }
  .pillar, .pillar + .pillar { padding: 22px 0 26px; border-left: 0; border-bottom: 1px solid var(--line) }
  .pillar__title { margin-top: 14px }
  .contact__row { grid-template-columns: 1fr }
}

@media (max-width: 640px) {
  body { font-size: 16px }
  .site-header__inner { height: 64px }
  .brand__full { display: none }
  .brand__mark { display: block }
  .brand svg { height: 34px }
  .nav a:not(.lang-switch) { display: none }
  .hero__top .label:last-child { display: none }
  .name { flex-direction: column; row-gap: .04em }
  .stats { grid-template-columns: 1fr 1fr }
  .stat:nth-child(3) { padding-left: 0; border-left: 0 }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line) }
  .stat { padding-bottom: 18px }
  .exp__item { grid-template-columns: 1fr; gap: 6px }
  .exp__item::before { display: none }
  .skills { grid-template-columns: 1fr }
  .skill:nth-child(even) { padding-left: 0; border-left: 0 }
  .faq { grid-template-columns: 1fr }
  .faq__item:nth-child(even) { padding-left: 0; border-left: 0 }
  .edu__item { flex-direction: column; gap: 6px }
  .contact__meta { grid-template-columns: 1fr }
  .colophon { flex-direction: column; align-items: flex-start }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  *, *::before, *::after { animation: none !important; transition: none !important }
  .js [data-reveal], .js .name > span { opacity: 1; transform: none }
}

@media print {
  .site-header, .marquee, .actions { display: none }
  .site-footer { background: none; color: #000 }
}
