/* =====================================================================
   portfolio.css — styles for the home page (index.html)
   ---------------------------------------------------------------------
   1. COLORS & FONTS   <- change the look here
   2. Base text
   3. Page layout (left column + right column)
   4. Sidebar card (name, bullets, buttons, social icons)
   5. Core Expertise
   6. Project blocks (studio header, two columns, info table, links)
   7. Screenshot slider
   8. Small cards (plugins, older projects)
   9. Footer and dark mode button
   10. Mobile
   11. Subtle animations
   12. Banner parallax
   13. Page panel + side dots (wide screens)
   14. Image lightbox
   15. Page transitions
   16. Section index (list on the right / menu button)
   ===================================================================== */


/* ---------- 1. COLORS & FONTS ---------------------------------------- */
:root {
  --radius: 4px;                         /* corner rounding of cards, buttons, boxes and the page panel (0 = sharp) */
  --font-text: "Raleway", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Lato", "Helvetica Neue", Arial, sans-serif;

  --page-bg: #ffffff;
  --text: #4a4a4a;            /* normal text */
  --text-strong: #363636;     /* headings and <strong> */
  --name: #3273dc;            /* your name in the sidebar */
  --name-hover: #1f4f9e;      /* your name when hovered */
  --line: #808080;            /* lines in the sidebar */
  --sidebar-bg: #f3f5f8;      /* grey background of the left profile card */
  --sidebar-shadow: 0 10px 30px -6px rgba(10,10,10,.22), 0 0 0 1px rgba(10,10,10,.06);
  --card-shadow: 0 8px 16px -2px rgba(10,10,10,.1), 0 0 0 1px rgba(10,10,10,.02);

  --social-bg: #ffffff;
  --social-border: #dbdbdb;
  --social-border-hover: #b5b5b5;

  --link-btn-bg: #ebebeb;     /* grey "Related Links" buttons */
  --link-btn-bg-hover: #dcdcdc;
  --link-btn-text: #666666;
  --link-btn-text-hover: #5e5e5e;

  --info-bg: #202223;         /* dark boxes: Project / Mode / Genre ... */
  --info-border: #3a3a3a;
  --info-label: #9a9a9a;
  --small-title: #737373;     /* "GAME VIDEO" / "RELATED LINKS" titles */
  --info-value: #e8e2d8;

  --slider-frame: #ffffff;
  --slider-bg: #111111;
  --dot: rgba(0,0,0,.5);
  --dot-active: rgba(0,0,0,.9);

  --todo: #b0650c;            /* class="todo": text you still need to write */

  --outer-bg: #eceef2;        /* wide screens: area outside the page panel */
  --panel-shadow: 0 20px 60px -20px rgba(10,10,10,.25), 0 0 0 1px rgba(10,10,10,.06);
  --side-dot: rgba(50,115,220,.30);   /* dots in the side margins */
}

/* Dark mode colors (used when <html> has class "dark") */
html.dark {
  --page-bg: #242525;
  --text: #b9b1a6;
  --text-strong: #c5beb3;
  --name: #5593cd;
  --name-hover: #8ab8e6;
  --line: #676c6d;
  --sidebar-bg: #2e3030;
  --sidebar-shadow: 0 10px 30px -6px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06);
  --card-shadow: 0 8px 16px -2px rgba(21,20,20,.1), 0 0 0 1px rgba(21,20,20,.02);

  --social-bg: #242525;
  --social-border: #45494a;
  --social-border-hover: #676c6d;

  --link-btn-bg: #2e3030;
  --link-btn-bg-hover: #373a3a;
  --link-btn-text: #a9a093;
  --link-btn-text-hover: #c5beb3;

  --info-bg: #252626;
  --info-border: #6b6e6f;
  --info-label: #a9a193;
  --small-title: #a9a193;
  --info-value: #d9cfbd;

  --slider-frame: #2e3030;
  --dot: rgba(255,255,255,.35);
  --dot-active: rgba(255,255,255,.85);

  --todo: #e0a458;

  --outer-bg: #1b1c1c;
  --panel-shadow: 0 20px 60px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.05);
  --side-dot: rgba(185,177,166,.30);
  color-scheme: dark;
}


/* ---------- 2. Base text --------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 24px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
strong { color: var(--text-strong); font-weight: 700; }
p { margin: 0 0 16px; }
ul { margin: 16px 0 0 32px; padding: 0; }
li { margin-top: 4px; }
h1, h2, h3, h4, h5, h6, .subtitle { font-family: var(--font-heading); font-weight: 700; color: var(--text-strong); }
h1 { font-size: 32px; line-height: 36px; margin: 20px 0 16px; }
h2 { font-size: 28px; line-height: 31.5px; margin: 12px 0; }
h3 { font-size: 24px; line-height: 27px; margin: 0 0 12px; }
h4 { font-size: 20px; line-height: 22.5px; margin: 12px 0; }
h6, .subtitle { font-size: 16px; line-height: 18px; margin: 12px 0; }   /* .subtitle: the small line under a project name */
.todo { color: var(--todo); font-style: italic; }
.center { text-align: center; }
body, a, .link-btn, .social a, .pills a, .info-box { transition: background-color .2s, color .2s, border-color .2s; }


/* ---------- 3. Page layout ------------------------------------------- */
.page { padding: 48px 24px; }
.columns {
  max-width: 1344px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);  /* sidebar 1/4, content 3/4 */
  column-gap: 12px;
  align-items: start;
}
.content-column { min-width: 0; }
.banner-wrap { position: relative; overflow: hidden; width: 100%; aspect-ratio: 1026 / 318; }
/* Desktop: banner is exactly as tall as the square profile photo, so both start and end
   on the same line. The photo is 1/4 of (.columns width - 12px gap). */
@media (min-width: 769px) {
  .columns { container-type: inline-size; }
  .banner-wrap { aspect-ratio: auto; height: calc((100cqw - 12px) / 4); }
}
.content { padding: 0 12px; }
.mobile-name { display: none; }
/* Left column (desktop only): the photo scrolls away with the page, the profile card
   under it sticks and follows you. The column stretches to the full page height so the
   card has room to stick. portfolio.js sets --sidebar-top: 24px when the card fits the
   window, otherwise a negative value so it first scrolls until its bottom is visible. */
.sidebar { align-self: stretch; }
.sidebar-card { position: sticky; top: var(--sidebar-top, 24px); }


/* ---------- 4. Sidebar card ------------------------------------------ */
.profile-photo { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
/* Photo and card are two separate rounded blocks with a shadow (like the banner),
   so the card still looks whole once the photo has scrolled away */
.profile-photo, .sidebar-card { border-radius: var(--radius); box-shadow: var(--sidebar-shadow); }
.sidebar-card {
  container: profile-card / inline-size;
  margin-top: 12px;                      /* same as the gap between the two columns */
  background: var(--sidebar-bg);
  padding: 20px;
}
.sidebar-card .name { display: block; font: 700 32px/36px var(--font-heading); color: var(--name); margin: 0 0 4px; }
.sidebar-card .name:hover, .topbar .site-name:hover { color: var(--name-hover); }
.sidebar-card .subtitle { font-size: 20px; line-height: 25px; margin: 0 0 24px; }
.sidebar-card ul { margin: 0 0 0 32px; }
.sidebar-card li { margin: 0 0 16px; }
.sidebar-card hr { border: 0; border-top: 2px solid var(--line); margin: 24px 0; }

/* Round outline buttons (Portfolio / Plugins / Resume / Contact) */
.pills { display: grid; grid-template-columns: repeat(2, max-content); justify-content: center; gap: 8px; }
.pills a {
  display: inline-block; text-align: center;
  border: 2px solid var(--text); border-radius: var(--radius);
  padding: 10.67px 21.28px; color: var(--text);
  background: var(--page-bg);
}
/* Hover: the button fills with the name color */
.pills a:hover { background: var(--name); border-color: var(--name); color: #ffffff; }

/* Centered social buttons; use two balanced rows when the card is narrow. */
.social {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 44px));
  justify-content: center;
  gap: 8px;
}
.social a {
  min-width: 0; height: 44px; display: grid; place-items: center;
  background: var(--social-bg); border: 1px solid var(--social-border);
  border-radius: var(--radius); color: var(--text-strong); font-size: 18px;
}
.social a:hover { border-color: var(--social-border-hover); position: relative; }
.social a:focus-visible { outline: 2px solid var(--brand, var(--name)); outline-offset: 2px; }
@container profile-card (min-width: 284px) {
  .social { grid-template-columns: repeat(6, 44px); gap: 4px; }
}

/* Brand colors on hover (matched by the link address, so no extra classes needed) */
.social a:hover { color: var(--brand, var(--text-strong)); border-color: var(--brand, var(--social-border-hover)); }
.social a[href*="linkedin.com"]  { --brand: #0a66c2; }
.social a[href*="github.com"]    { --brand: #6e5494; }
.social a[href*="youtube.com"]   { --brand: #ff0000; }
.social a[href*="discord"]       { --brand: #5865f2; }
.social a[href*="steamcommunity"]{ --brand: #1b2838; }
.social a[href*="itch.io"]       { --brand: #fa5c5c; }
.social a[href^="mailto:"]       { --brand: #ea4335; }
.social a[href^="https://wa.me/"] { --brand: #137f40; }
html.dark .social a[href*="linkedin.com"]  { --brand: #3b8fe0; }
html.dark .social a[href*="github.com"]    { --brand: #a98ad6; }
html.dark .social a[href*="steamcommunity"]{ --brand: #66c0f4; }
html.dark .social a[href^="https://wa.me/"] { --brand: #25d366; }


/* ---------- 5. Core Expertise ---------------------------------------- */
.expertise {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 60px;
  margin-top: 44px;
}
.expertise > div { margin-bottom: 42px; }
.expertise h3 i { margin-right: 6px; }


/* ---------- 6. Project blocks ---------------------------------------- */
.section-title { margin-top: 56px; }
.project { padding-top: 72px; }
.project.no-header { padding-top: 64px; }  /* a project that sits under the previous header */
/* Divider between blocks: a full line before each company / section header,
   a short centered line between projects that share a header */
.project + .project { margin-top: 72px; border-top: 2px solid var(--line); }
.project + .project.no-header { margin-top: 64px; border-top: 0; position: relative; }
.project + .project.no-header::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 120px; border-top: 2px solid var(--line);
}

/* Centered studio header: logo, studio name, your role */
.studio-header { text-align: center; }
.studio-header h3 { margin: 24px 0 12px; }
.studio-header { margin-bottom: 32px; }   /* space between the header and the project below */
.studio-header h4 { margin: 0; }
.studio-header .dates { margin: 8px 0 0; font-size: 16px; color: var(--text); }   /* (start – end) under the role */
/* Company logo, shown on a black plate so white logos stay visible in light mode.
   "padded" adds room around logos that have no black background of their own. */
.studio-logo { display: block; margin: 0 auto; width: 320px; max-width: 100%; height: auto; background: #000; border-radius: var(--radius); }
.studio-logo.padded { width: 320px; padding: 26px 34px; }
.studio-logo.small { width: 170px; padding: 26px 40px; }   /* small square-ish logos like Fab */
.letter-logo {   /* round logo with letters, used when there is no logo image */
  width: 110px; height: 110px; margin: 0 auto;
  display: grid; place-items: center;
  border-radius: 50%; border: 2px solid var(--text-strong);
  font: 700 34px var(--font-heading); color: var(--text-strong);
}

/* Two columns: left = text, right = info boxes + links */
.two-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 30px; align-items: start; }
.cover { display: block; width: 300px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin: 0 auto; }
.cover.fit { object-fit: contain; background: #000; }
.platforms { display: flex; justify-content: center; gap: 12px; margin: 14px 0 4px; font-size: 26px; color: var(--text-strong); }
.platforms .fa-steam { color: #1b2838; }
.platforms .fa-playstation { color: #003791; }
.platforms .fa-xbox { color: #107c10; }
html.dark .platforms .fa-steam { color: #c7d5e0; }
html.dark .platforms .fa-playstation { color: #4f7fe0; }
.project-title { text-align: center; margin: 8px 0 4px; text-transform: uppercase; }
.project-genre { text-align: center; margin: 8px 0 16px; }
.left h4 { margin: 20px 0 12px; }
.left ul { margin-top: 12px; }

/* Dark info boxes */
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.info-box { padding: 12px 14px; border: 1px solid var(--info-border); border-radius: var(--radius); background: var(--info-bg); }
.info-box .label { font-size: 12px; line-height: 18px; color: var(--info-label); text-transform: uppercase; letter-spacing: .08em; }
.info-box .value { margin-top: 4px; font-size: 15px; line-height: 20px; font-weight: 700; color: var(--info-value); }
.info-box .value.todo { color: var(--todo); }

/* YouTube video under the info boxes */
.video { aspect-ratio: 16 / 9; margin-bottom: 8px; }
.video iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }

/* Small headings above the video and the links ("GAME VIDEO", "RELATED LINKS") */
.related-title {
  margin: 28px 0 12px;
  font-size: 12px; line-height: 18px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--small-title);
}

/* "Related Links" list: one framed card, one row per link.
   Put the links inside <div class="links"> ... </div> under the "Related Links" title. */
.links { border: 1px solid var(--social-border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.links .link-btn {
  justify-content: flex-start; gap: 12px;
  min-height: 0; padding: 13px 16px; margin: 0;
  border: 0; border-radius: 0; background: none;
  font-size: 15px; color: var(--text-strong);
}
.links .link-btn + .link-btn { border-top: 1px solid var(--social-border); }
.links .link-btn i { width: 18px; text-align: center; font-size: 16px; color: var(--text); }
/* Arrow on the right: → for pages on this site, ↗ for other sites (links with target="_blank") */
.links .link-btn::after { content: "\2192"; margin-left: auto; opacity: .4; transition: transform .2s, opacity .2s; }
.links .link-btn[target="_blank"]::after { content: "\2197"; }
/* Hover: row turns grey, text and icon turn blue, arrow nudges right */
.links .link-btn:hover, .links .link-btn.github:hover {
  background: var(--sidebar-bg); color: var(--name); transform: none; box-shadow: none;
}
.links .link-btn:hover i { transform: none; color: var(--name); }
.links .link-btn:hover::after { opacity: 1; transform: translateX(3px); }
/* "Project Breakdown (Soon)": faded, no arrow, no hover */
.links .link-btn.disabled::after { content: none; }
.links .link-btn.disabled:hover { background: none; color: var(--text-strong); }
.links .link-btn.disabled:hover i { color: var(--text); }
html.dark .links .link-btn.disabled:hover { background: none; }

/* Epic Games logo (Font Awesome has none): imgs/icons/epic-games.svg, takes the text color */
.icon-epic {
  display: inline-block; height: 16px;
  background-color: currentColor;
  -webkit-mask: url("/imgs/icons/epic-games.svg") center / contain no-repeat;
          mask: url("/imgs/icons/epic-games.svg") center / contain no-repeat;
}

/* Grey full-width link buttons (Fab cards, itch.io cards) */
.link-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 46px; padding: 11px 20px; margin-bottom: 22px;
  border-radius: var(--radius); border: 1px solid var(--link-btn-bg);
  background: var(--link-btn-bg) linear-gradient(rgba(255,255,255,.2), rgba(255,255,255,.01));
  font-size: 14px; line-height: 20px; color: var(--link-btn-text);
}
/* Hover: fills with the blue of your name, lifts a little and the icon nudges right */
.link-btn { transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s; }
.link-btn i { transition: transform .2s; }
.link-btn:hover {
  background-color: var(--name); background-image: none; border-color: var(--name); color: #fff;
  transform: translateY(-2px); box-shadow: 0 6px 16px -4px var(--name);
}
.link-btn:hover i { transform: translateX(3px); }
html.dark .link-btn { background-image: none; }


/* ---------- 7. Screenshot slider ------------------------------------- */
.slider { margin: 56px 0 60px; }
.slides {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 4px solid var(--slider-frame); border-radius: var(--radius);
  background: var(--slider-bg);
}
.slides img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;            /* change to "cover" to fill the frame and crop */
  opacity: 0; transition: opacity .6s ease;
}
.slides img.active { opacity: 1; }
.slides .arrow {
  position: absolute; top: 50%; margin-top: -20px; width: 40px; height: 40px;
  border: 0; background: none; cursor: pointer; font-size: 28px;
  color: rgba(255,255,255,.85); opacity: 0; transition: opacity .3s;
}
.slides .prev { left: 10px; }
.slides .next { right: 10px; }
.slides:hover .arrow, .slides .arrow:focus-visible { opacity: 1; }
.dots { display: flex; justify-content: center; gap: 12px; margin-top: 14px; }
.dots button {
  width: 11px; height: 11px; padding: 0; border: 0; border-radius: 20px; cursor: pointer;
  background: var(--dot); box-shadow: inset 0 0 3px rgba(0,0,0,.3);
}
.dots button.active { background: var(--dot-active); }


/* ---------- 8. Small cards (plugins, older projects) ----------------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-top: 8px; }
.cards > div { display: flex; flex-direction: column; }
.cards > div p:not(.subtitle) { flex: 1; }
.cards img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cards h4 { text-align: center; margin: 16px 0 4px; }
.cards h6, .cards .subtitle { text-align: center; margin: 4px 0 12px; }
.cards .link-btn { margin: 0; }
/* Two buttons side by side in a card (Fab Page + YouTube) */
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-row .link-btn { padding: 11px 10px; gap: 8px; }
/* YouTube button: turns YouTube red on hover */
/* GitHub button: turns GitHub purple on hover */
.link-btn.github:hover { background-color: #6e5494; border-color: #6e5494; box-shadow: 0 6px 16px -4px #6e5494; }
/* Disabled button, e.g. "Project Breakdown (Soon)": visible but not clickable */
.link-btn.disabled { opacity: .55; cursor: not-allowed; }
.link-btn.disabled:hover { background: var(--link-btn-bg) linear-gradient(rgba(255,255,255,.2), rgba(255,255,255,.01)); border-color: var(--link-btn-bg); color: var(--link-btn-text); transform: none; box-shadow: none; }
.link-btn.disabled:hover i { transform: none; }
html.dark .link-btn.disabled:hover { background-image: none; }
.link-btn.youtube:hover { background-color: #ff0000; border-color: #ff0000; box-shadow: 0 6px 16px -4px #ff0000; }


/* ---------- 9. Footer and dark mode button --------------------------- */
.footer {
  max-width: 1344px; margin: 24px auto 0; padding: 24px 12px 0;
  border-top: 1px solid var(--social-border);
  font-size: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.theme-toggle {
  position: fixed; right: 26px; bottom: 90px; z-index: 10;
  width: 50px; height: 50px; border-radius: var(--radius); border: 0; cursor: pointer;
  background: #555; color: #fff; font-size: 22px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
html.dark .theme-toggle { background: #fff; color: #7d58e8; }

/* Language button (EN/TR): made by portfolio.js, sits above the dark mode button */
.lang-toggle {
  position: fixed; right: 26px; bottom: 154px; z-index: 10;
  width: 50px; height: 50px; border-radius: var(--radius); border: 0; cursor: pointer;
  background: #555; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font: 700 13px/1.1 var(--font-heading);
}
.lang-toggle span { opacity: .7; }
.lang-toggle span.on { opacity: 1; }
html.dark .lang-toggle { background: #fff; color: #7d58e8; }
html.dark .lang-toggle span:not(.on) { opacity: 1; color: #737373; }

/* Turkish text: a lang="en" element followed by a lang="tr" element are twins, only the current
   language shows. A lang="en" element on its own (a game name, for example) always shows. */
html[lang="tr"] body [lang="en"]:has(+ [lang="tr"]),
html:not([lang="tr"]) body [lang="tr"] { display: none !important; }

/* Back to top button: made by portfolio.js, shows up after scrolling down */
.back-to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 10;
  width: 50px; height: 50px; border-radius: var(--radius); border: 0; cursor: pointer;
  background: #555; color: #fff; font-size: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .2s, transform .2s, visibility .2s, background-color .2s, color .2s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
html.dark .back-to-top { background: #fff; color: #555; }


/* ---------- 10. Mobile ----------------------------------------------- */
@media (max-width: 1000px) {
  .two-columns { grid-template-columns: minmax(0, 1fr); }
  .two-columns .right { margin-top: 24px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
  .page { padding: 24px 0 32px; }  /* space above the profile card on mobile */
  .columns { grid-template-columns: minmax(0, 1fr); }
  /* Mobile: nothing sticks; photo + card are one rounded block again */
  .sidebar { max-width: 342px; width: 100%; margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--sidebar-shadow); }
  .profile-photo { border-radius: 0; box-shadow: none; }
  .sidebar-card { position: static; margin-top: 0; border-radius: 0; box-shadow: none; text-align: center; }
  .sidebar-card ul { margin-left: 0; list-style-position: inside; }
  .content-column { margin-top: 24px; }
  .expertise { grid-template-columns: minmax(0, 1fr); }
  .footer { margin: 24px 12px 0; }
  .theme-toggle { right: 16px; bottom: 80px; }
  .lang-toggle { right: 16px; bottom: 144px; }
  .back-to-top { right: 16px; bottom: 16px; }
}

/* ---------- External text links (game / company names) ----------
   Thin underline + small ↗ so they look clickable but stay quiet. */
.ext-link {
  color: inherit;
  white-space: nowrap;           /* keep name + ↗ on one line */
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
  transition: text-decoration-color .15s, color .15s;
}
.ext-link::after {
  content: "\2197";              /* ↗ */
  display: inline-block;
  margin-left: 2px;
  font-size: .7em;
  font-weight: 400;
  vertical-align: super;
  line-height: 0;
  opacity: .6;
  text-decoration: none;
}
.ext-link:hover { text-decoration-color: currentColor; color: var(--text-strong); }
.ext-link:hover::after { opacity: 1; }


/* ---------- 11. Subtle animations ------------------------------------ */
/* Blocks fade in and slide up a little as you scroll to them. portfolio.js adds the
   class "reveal" to them and "in" when they come into view, so no HTML changes needed.
   To make it stronger or softer, change these two values: */
:root { --reveal-distance: 18px; --reveal-time: .6s; }
.reveal {
  opacity: 0; transform: translateY(var(--reveal-distance));
  transition: opacity var(--reveal-time) ease-out, transform var(--reveal-time) ease-out;
  transition-delay: var(--reveal-delay, 0s);   /* cards in a row come in one after another */
}
.reveal.in { opacity: 1; transform: none; }

/* Small cards (Fab assets, older projects): the image lifts a little on hover */
.cards > div img { transition: transform .25s ease, box-shadow .25s ease; }
.cards > div:hover img { transform: translateY(-4px); box-shadow: var(--card-shadow); }

/* Profile card (left column): when the page opens it slides in from the left
   (from below on phones), then the things inside it appear one after another.
   Pure CSS, runs once on load. To change it, edit these values: */
:root {
  --intro-distance: 28px;   /* how far the card slides */
  --intro-time: .6s;        /* how long the card slide takes */
  --intro-step: .07s;       /* gap between each item inside the card */
}
@keyframes intro-from-left  { from { opacity: 0; transform: translateX(calc(var(--intro-distance) * -1)); } to { opacity: 1; transform: none; } }
@keyframes intro-from-below { from { opacity: 0; transform: translateY(var(--intro-distance)); } to { opacity: 1; transform: none; } }
@keyframes intro-fade-up    { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.sidebar { animation: intro-from-left var(--intro-time) cubic-bezier(.2,.7,.3,1) both; }
.sidebar-card > * { animation: intro-fade-up .45s ease-out both; }
.sidebar-card > :nth-child(1) { animation-delay: calc(var(--intro-step) * 3); }  /* name */
.sidebar-card > :nth-child(2) { animation-delay: calc(var(--intro-step) * 4); }  /* subtitle */
.sidebar-card > :nth-child(3) { animation-delay: calc(var(--intro-step) * 5); }  /* list */
.sidebar-card > :nth-child(4) { animation-delay: calc(var(--intro-step) * 6); }  /* line */
.sidebar-card > :nth-child(5) { animation-delay: calc(var(--intro-step) * 7); }  /* buttons */
.sidebar-card > :nth-child(6) { animation-delay: calc(var(--intro-step) * 8); }  /* line */
.sidebar-card > :nth-child(7) { animation-delay: calc(var(--intro-step) * 9); }  /* social icons */
@media (max-width: 768px) {
  .sidebar { animation-name: intro-from-below; }
}
/* Main content (right column, home page): on desktop it slides up from below at the
   same time, a little after the card. --intro-content-delay = how much later it starts. */
:root { --intro-content-delay: .1s; }
@media (min-width: 769px) {
  .content-column {
    animation: intro-from-below var(--intro-time) cubic-bezier(.2,.7,.3,1) var(--intro-content-delay) both;
    overflow-anchor: none;   /* stops the browser nudging the page down when the slide ends */
  }
}

/* Coming back from a breakdown page (Back button): no slide-in, the page just fades in
   at the project you clicked. "no-intro" is added by portfolio.js. */
html.no-intro .sidebar, html.no-intro .sidebar-card > *, html.no-intro .content-column { animation: none; }

/* Visitors who turned off animations in their system settings get none */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cards > div img, .cards > div:hover img { transition: none; transform: none; }
  .sidebar, .sidebar-card > *, .content-column { animation: none; }
}
@media print { .reveal { opacity: 1; transform: none; } .sidebar, .sidebar-card > *, .content-column { animation: none; } }


/* ---------- 12. Banner parallax ------------------------------------- */
/* The picture is a little taller than its frame and portfolio.js slides it down as you
   scroll, so it moves slower than the text. */
:root { --parallax-range: 44px; }   /* how far the picture lags behind. 0px = no parallax */
.banner-wrap .banner {
  position: absolute; left: 0; top: calc(var(--parallax-range) * -1);
  width: 100%; height: calc(100% + var(--parallax-range));
  object-fit: cover;
  will-change: transform;
}
/* Rounded corners + the same soft shadow as the profile card, so both look alike.
   Phones: 12px space on the left and right (same as the text below) so it does not
   touch the screen edges. Change the 12px to make that space bigger or smaller. */
.banner-wrap { border-radius: var(--radius); box-shadow: var(--sidebar-shadow); }
@media (max-width: 768px) { .banner-wrap { margin: 0 12px; width: auto; } }
@media (max-width: 768px) { :root { --parallax-range: 24px; } }
@media (prefers-reduced-motion: reduce) { :root { --parallax-range: 0px; } }


/* ---------- 13. Page panel + side dots (wide screens) ----------------- */
/* On wide screens the page sits on a rounded panel with a soft shadow, the area
   around it is one shade darker (--outer-bg) and has a faint dot pattern that
   fades out toward the panel. Phones and narrow windows are not affected.
   Dot size/spacing: background-size below. Panel width: max-width below. */
@media (min-width: 1100px) {
  body { background: var(--outer-bg); position: relative; z-index: 0; }
  .page {
    max-width: 1392px;           /* .columns (1344px) + 24px padding on each side */
    margin: 32px auto;
    background: var(--page-bg);
    border-radius: var(--radius);
    box-shadow: var(--panel-shadow);
  }
  .page.project { max-width: 1048px; }   /* breakdown pages: 1000px content + padding */
  body { --dots-clear: 680px; }          /* half the panel width: no dots inside this */
  body:has(.page.project) { --dots-clear: 510px; }
  body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image: radial-gradient(var(--side-dot) 1.2px, transparent 1.6px);
    background-size: 22px 22px;
    /* visible at the screen edges, gone near the panel */
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(50% - var(--dots-clear) - 140px), transparent calc(50% - var(--dots-clear)), transparent calc(50% + var(--dots-clear)), #000 calc(50% + var(--dots-clear) + 140px), #000 100%);
            mask-image: linear-gradient(to right, #000 0, #000 calc(50% - var(--dots-clear) - 140px), transparent calc(50% - var(--dots-clear)), transparent calc(50% + var(--dots-clear)), #000 calc(50% + var(--dots-clear) + 140px), #000 100%);
  }
}


/* ---------- 14. Image lightbox (click a screenshot to see it big) ---- */
/* portfolio.js makes the viewer and opens it. The same dark look in light and dark mode. */
:root {
  --lb-backdrop: rgba(10,10,12,.92);   /* dark area behind the picture */
  --lb-time: .32s;                     /* fade and zoom duration */
  --lb-easing: cubic-bezier(.2,.7,.2,1);
}
.zoomable { cursor: zoom-in; }
.slides.zoomable .arrow { cursor: pointer; }
.zoom-frame {
  display: block; position: relative; width: fit-content; max-width: 100%;
  margin: 16px auto; overflow: hidden; border-radius: var(--radius);
}
.project-content .zoom-frame > img.zoomable { margin: 0; }
.slides.zoomable img { transition: opacity .6s ease, transform .3s ease; }
.zoom-frame > img.zoomable { transition: transform .3s ease; }
.zoom-hint {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: var(--radius);
  background: rgba(10,10,12,.85); color: #fff;
  font: 700 12px/18px var(--font-text); box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
button.zoom-hint { min-height: 44px; cursor: zoom-in; }
.zoom-frame .zoom-hint { pointer-events: none; }
button.zoom-hint:focus-visible, .zoom-frame:has(:focus-visible) { outline: 2px solid var(--name); outline-offset: 3px; }
@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  .slides.zoomable::after, .zoom-frame::after {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: rgba(0,0,0,.45); opacity: 0; pointer-events: none;
    transition: opacity .3s ease;
  }
  .slides.zoomable .arrow { z-index: 3; }
  .zoom-hint {
    top: 50%; left: 50%; right: auto; bottom: auto;
    width: max-content; max-width: calc(100% - 32px);
    background: transparent; border-color: transparent; box-shadow: none;
    font-size: 14px; text-align: center; opacity: 0; pointer-events: none;
    transform: translate(-50%, -35%);
    transition: opacity .3s ease, transform .3s ease;
  }
  /* Pointer clicks leave buttons focused; only keyboard focus should keep the hint visible. */
  .slides.zoomable:is(:hover, :has(:focus-visible))::after,
  .zoom-frame:is(:hover, :has(:focus-visible))::after { opacity: 1; }
  .slides.zoomable:is(:hover, :has(:focus-visible)) .zoom-hint,
  .zoom-frame:is(:hover, :has(:focus-visible)) .zoom-hint {
    opacity: 1; transform: translate(-50%, -50%);
  }
  .slides.zoomable:is(:hover, :has(:focus-visible)) button.zoom-hint { pointer-events: auto; }
  .slides.zoomable:is(:hover, :has(:focus-visible)) img,
  .zoom-frame:is(:hover, :has(:focus-visible)) > img.zoomable { transform: scale(1.025); }
}
@media (max-width: 480px) {
  .zoom-hint { right: 8px; bottom: 8px; padding: 7px 9px; gap: 6px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .slides.zoomable img, .zoom-frame > img.zoomable { transition: none; transform: none; }
  .slides.zoomable:is(:hover, :has(:focus-visible)) img,
  .zoom-frame:is(:hover, :has(:focus-visible)) > img.zoomable { transform: none; }
  .zoom-hint, .slides.zoomable::after, .zoom-frame::after { transition: none; }
}
@media print { .zoom-hint { display: none; } }
html.lightbox-open, html.lightbox-open body { overflow: hidden; }   /* page does not scroll behind it */

.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: var(--lb-backdrop);
  opacity: 0; transition: opacity var(--lb-time) var(--lb-easing);
  touch-action: pan-y pinch-zoom;
}
.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }
.lb-stage {
  margin: 0; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 80px 24px; box-sizing: border-box;
}
.lb-img {
  display: block; max-width: 100%; max-height: calc(100% - 48px);
  object-fit: contain; border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  transform: translateY(16px) scale(.86);
  transition: transform var(--lb-time) var(--lb-easing), opacity .2s;
}
.lightbox.open .lb-img { transform: none; }
.lightbox.loading .lb-img { opacity: .4; }
.lb-caption {
  margin-top: 14px; max-width: 900px;
  color: #ddd; font-size: 15px; line-height: 22px; text-align: center;
}
.lb-count {
  position: absolute; top: 18px; left: 22px;
  color: #bbb; font-size: 14px; letter-spacing: .05em;
}
.lb-btn {
  position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.1); color: #fff; font-size: 20px; cursor: pointer;
  transition: background .2s;
}
.lb-btn:hover, .lb-btn:focus-visible { background: rgba(255,255,255,.22); }
.lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-btn[hidden] { display: none; }
.lb-close { top: 10px; right: 12px; }
.lb-prev, .lb-next { top: 50%; margin-top: -24px; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

@media (max-width: 768px) {
  .lb-stage { padding: 56px 8px 72px; }
  /* on phones the arrows sit at the bottom so they don't cover the picture */
  .lb-prev, .lb-next { top: auto; bottom: 14px; margin-top: 0; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox, .lb-img { transition: none; }
  .lb-img { transform: none; }
}


/* ---------- 15. Page transitions ------------------------------------- */
/* Going to another page of the site: the page fades out (portfolio.js adds the class
   "page-leaving" to <html>), and every page fades in when it opens. */
:root {
  --page-fade-out: .18s;   /* how long the old page fades out (portfolio.js waits this long) */
  --page-fade-in: .35s;    /* how long the new page fades in */
}
@keyframes page-fade-in { from { opacity: 0; } }
body > * { animation: page-fade-in var(--page-fade-in) ease-out backwards; }
body > .lightbox { animation: none; }
html.page-leaving body > * { opacity: 0; transition: opacity var(--page-fade-out) ease-in; }
@media (prefers-reduced-motion: reduce) {
  :root { --page-fade-out: 0s; }
  body > * { animation: none; }
}
@media print { body > * { animation: none; } }


/* ---------- 16. Section index (list on the right / menu button) ------ */
/* The list of home page sections (index.html, "SECTION INDEX").
   Wide screens (1780px+): it sits to the right of the page panel, the section you
   are reading is blue with a bar on its left (portfolio.js marks it "active").
   Smaller screens: hidden; the list button (made by portfolio.js, above EN/TR)
   opens it as a small menu and blurs the page behind it. */
:root {
  --index-text: #737373;                 /* section names */
  --index-line: rgba(10,10,10,.12);      /* thin line on the left of the list */
  --index-blur: 6px;                     /* how blurry the page gets behind the menu */
  --index-shade: rgba(0,0,0,.25);        /* how dark the page gets behind the menu */
  --index-top: 90px;                     /* wide screens: distance of the side list from the top of the window */
  --index-follow-time: .4s;              /* how softly the side list follows the scroll */
  --index-follow-gap: 90px;              /* closest it gets to the top/bottom of the window */
}
html.dark {
  --index-text: #9a9389;
  --index-line: rgba(255,255,255,.12);
}
.section-index ul { list-style: none; margin: 0; padding: 0; }
.section-index li { margin: 0; }
.section-index a { display: block; font-family: var(--font-heading); color: var(--index-text); transition: color .2s, background-color .2s, border-color .2s; }
.section-index a.active { color: var(--name); font-weight: 700; }

/* Small menu (below 1780px) */
.section-index {
  position: fixed; right: 90px; bottom: 218px; z-index: 12; min-width: 200px;
  padding: 10px 0; border-radius: var(--radius);
  background: var(--page-bg);
  box-shadow: 0 12px 32px -6px rgba(10,10,10,.3), 0 0 0 1px rgba(10,10,10,.08);
  opacity: 0; visibility: hidden; transform: translateX(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
html.dark .section-index { background: var(--sidebar-bg); box-shadow: 0 12px 32px -6px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08); }
.section-index.open { opacity: 1; visibility: visible; transform: none; }
.section-index a { padding: 7px 20px; font-size: 15px; line-height: 20px; border-left: 3px solid transparent; }
.section-index a:hover { background: var(--link-btn-bg); color: var(--text-strong); }
.section-index a.active { color: var(--name); border-left-color: var(--name); }

.index-toggle {
  position: fixed; right: 26px; bottom: 218px; z-index: 12;
  width: 50px; height: 50px; border-radius: var(--radius); border: 0; cursor: pointer;
  background: #555; color: #fff; font-size: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: background-color .2s, color .2s;
}
html.dark .index-toggle { background: #fff; color: #555; }
.index-toggle.on, html.dark .index-toggle.on { background: var(--name); color: #fff; }
.index-shade {
  position: fixed; inset: 0; z-index: 11;
  background: var(--index-shade);
  -webkit-backdrop-filter: blur(var(--index-blur)); backdrop-filter: blur(var(--index-blur));
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.index-shade.open { opacity: 1; visibility: visible; }
@media (max-width: 1000px) {
  .index-toggle { right: 16px; bottom: 208px; }
  .section-index { right: 76px; bottom: 208px; }
}

/* Wide screens: always-visible list to the right of the page panel */
@media (min-width: 1780px) {
  .index-toggle, .index-shade { display: none; }
  .section-index {
    position: fixed; top: var(--index-top); bottom: auto; right: auto; z-index: 5;
    left: calc(50% + 696px + 24px);      /* 696px = half the page panel (section 13) */
    min-width: 0; padding: 8px 12px 8px 0; border-radius: var(--radius);
    /* same colour as the area around the panel, with soft edges, so the side dots
       fade out behind the text instead of running through it */
    background: var(--outer-bg);
    box-shadow: 0 0 18px 14px var(--outer-bg);
    opacity: 1; visibility: visible; transform: none;
  }
  /* Optional: add data-follow to the nav in index.html to make the list move down the window
     as you scroll (portfolio.js sets "top"). Without it the list stays pinned at --index-top. */
  .section-index.following { transform: none; transition: top var(--index-follow-time) ease-out; }
  html.dark .section-index { background: var(--outer-bg); box-shadow: 0 0 18px 14px var(--outer-bg); }
  .section-index ul { border-left: 2px solid var(--index-line); }
  .section-index a { white-space: nowrap; font-size: 14px; line-height: 18px; padding: 7px 0 7px 14px; margin-left: -2px; border-left-width: 2px; }
  .section-index a:hover { background: none; }
}
@media (prefers-reduced-motion: reduce) {
  .section-index, .index-shade, .section-index.following { transition: none; }
}


/* Portfolio content hierarchy and the compact project archive. */
.intro-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }
.intro-links .link-btn { margin: 0; }
.skills-section .expertise { margin-top: 24px; gap: 30px; }
.skills-section .expertise > div { margin-bottom: 0; }
.supporting-skills { font-size: 15px; }
.supporting-skills h3 { font-size: 20px; }
.cards .evidence { flex: 0; font-size: 14px; line-height: 1.5; }
.evidence small { font-size: 12px; }
.btn-row .documentation { grid-column: 1 / -1; }
.archive-section { padding-top: 40px; }
.project-archive { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.project-archive summary { cursor: pointer; min-height: 44px; padding: 10px 0; font: 700 20px/1.4 var(--font-heading); color: var(--text-strong); }
.project-archive summary::marker { color: var(--name); }
.project-archive summary:focus-visible { outline: 2px solid var(--name); outline-offset: 4px; }
.project-archive .cards { gap: 24px; margin: 24px 0 8px; }
.project-archive .cards h4 { font-size: 18px; }
.project-archive .cards p { font-size: 14px; }
.contact-section { padding-bottom: 24px; }

/* Contact actions stay in one row, including on narrow screens. */
.contact-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0 8px; }
.contact-actions .contact-email { --contact-color: #b83d32; }
.contact-actions .contact-resume { --contact-color: #245bb5; }
.contact-actions .contact-whatsapp { --contact-color: #137f40; }
.contact-actions .link-btn { min-width: 0; min-height: 64px; margin: 0; padding: 14px 12px; border-color: var(--social-border); color: var(--text-strong); }
.contact-actions .link-btn i { flex-shrink: 0; font-size: 20px; color: var(--contact-color); }
html.dark .contact-actions .contact-email i { color: #f28b82; }
html.dark .contact-actions .contact-resume i { color: #8ab4f8; }
html.dark .contact-actions .contact-whatsapp i { color: #25d366; }
.contact-actions .link-btn:hover, .contact-actions .link-btn:focus-visible { background: var(--contact-color); border-color: var(--contact-color); color: #fff; box-shadow: 0 6px 16px -4px var(--contact-color); }
.contact-actions .link-btn:hover i, .contact-actions .link-btn:focus-visible i,
html.dark .contact-actions .link-btn:hover i, html.dark .contact-actions .link-btn:focus-visible i { color: #fff; }
.contact-actions .link-btn:focus-visible { outline: 2px solid var(--contact-color); outline-offset: 3px; }
@media (max-width: 480px) {
  .contact-section { padding-bottom: 192px; } /* Keep the action row above the fixed language/theme controls at the end of the page. */
  .contact-actions { gap: 8px; }
  .contact-actions .link-btn { flex-direction: column; gap: 8px; min-height: 100px; padding: 12px 6px; font-size: 13px; line-height: 18px; text-align: center; }
}
