/* =========================================================
   Kaan Can Kurt — Portfolio
   Clean editorial redesign (OpenHands-inspired):
   near-monochrome warm canvas, one locked gold accent,
   generous whitespace, restrained motion.
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* ---------- Design tokens ---------- */
:root {
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
  --font-display: "Sora", "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Brand palette — gold is the single locked accent */
  --accent: #e0a93b;
  --accent-strong: #a9760f; /* readable on light bg (WCAG AA) */
  --accent-soft: #f2c66d;
  --accent-tint: rgba(224, 169, 59, 0.1);

  --bg-color: #fcfbf9;
  --bg-elev: #ffffff;
  --bg-subtle: #f5f2ec;
  --card-bg: #ffffff;
  --text-color: #1c1a17;
  --primary-color: #1c1a17;
  --muted-color: #6d685f;
  --border-color: #e9e4db;
  --nav-bg: rgba(252, 251, 249, 0.8);

  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(28, 26, 23, 0.05), 0 1px 2px rgba(28, 26, 23, 0.04);
  --shadow-md: 0 10px 28px rgba(28, 26, 23, 0.08);
  --shadow-lg: 0 26px 60px rgba(28, 26, 23, 0.12);

  --maxw: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --accent: #f2c66d;
  --accent-strong: #f4cd7e;
  --accent-soft: #d4a574;
  --accent-tint: rgba(242, 198, 109, 0.12);

  --bg-color: #131211;
  --bg-elev: #1c1a18;
  --bg-subtle: #201d1a;
  --card-bg: #1c1a18;
  --text-color: #f4f0e8;
  --primary-color: #f4f0e8;
  --muted-color: #a8a297;
  --border-color: #2c2926;
  --nav-bg: rgba(19, 18, 17, 0.78);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.55);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* These controls used to be <div>s. As real <button>s they are keyboard
   reachable; this strips the UA chrome so they keep their old look.
   Placed early on purpose - the specific rules further down still win. */
.hamburger-icon,
.menu-close,
.theme-toggle {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}

/* Social icons are links now; the wrapper carries the focus ring. */
.icon-link {
  display: inline-flex;
  border-radius: 50%;
}

/* One visible focus style for everything that can take focus. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

/* Soft ambient glow anchored top-right (brand warmth) */
body::before {
  content: "";
  position: fixed;
  top: -22vh;
  right: -12vw;
  width: 58vw;
  height: 58vw;
  max-width: 680px;
  max-height: 680px;
  background: radial-gradient(circle, var(--accent-tint) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

p {
  color: var(--muted-color);
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  color: var(--primary-color);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

section {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 7rem 2rem;
  scroll-margin-top: 5rem;
}

/* Section eyebrow + title (eyebrows used sparingly: hero + projects only) */
.section__text__p1 {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  font-weight: 700;
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 3.5rem;
}

#projects .title {
  margin-top: 0.4rem;
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* =========================================================
   NAVIGATION
   ========================================================= */
nav {
  display: flex;
}

#main-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  justify-content: space-between;
  align-items: center;
  height: 72px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 2rem;
  background: var(--nav-bg);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

/* full-bleed hairline under the centered nav when scrolled */
#main-nav.scrolled {
  border-bottom-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo-img {
  height: 44px;
  width: auto;
}

.logo-dark {
  display: none;
}

[data-theme="dark"] .logo-light {
  display: none;
}

[data-theme="dark"] .logo-dark {
  display: block;
}

.logo:hover {
  cursor: pointer;
}

.nav-links-container {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a {
  position: relative;
  color: var(--muted-color);
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s var(--ease);
}

.nav-links a:hover {
  color: var(--text-color);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hamburger nav (mobile) */
#hamburger-nav {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  height: 62px;
  position: sticky;
  top: 0;
  z-index: 50;
  /* The frosted bar lives on ::before, not here. A backdrop-filter on
     this element would make it the containing block for its own
     position:fixed children — which turns the off-canvas menu drawer
     into an absolutely placed box that widens the whole page. */
  background: transparent;
  border-bottom: 1px solid var(--border-color);
}

#hamburger-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: none;
}

.hamburger-nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 20px;
  width: 28px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--bg-elev);
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  border-radius: 0 0 16px 16px;
  box-shadow: var(--shadow-md);
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.menu-links a {
  display: block;
  padding: 12px 28px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-color);
}

.menu-links a:hover {
  color: var(--accent-strong);
}

.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 360px;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(6px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(6px, -5px);
}

/* =========================================================
   HERO BANNER (blurs away as the hero scrolls past)
   =========================================================
   --banner-p runs 0 -> 1 as the card leaves the top of the
   viewport (set from script.js). Everything below is derived
   from it, so the whole effect is one number. */
.hero-banner {
  --banner-p: 0;
  position: relative;
  width: 100%;
  aspect-ratio: 2172 / 724;
  overflow: clip;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: var(--bg-subtle);
}

.hero-banner__inner {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  /* Blur + desaturate + drift away, the way a pinned panel
     dissolves instead of just scrolling out of frame. The
     scale keeps blurred edges covering the card's corners. */
  filter: blur(calc(var(--banner-p) * 20px))
    saturate(calc(1 - var(--banner-p) * 0.4));
  opacity: clamp(0, calc(1.06 - var(--banner-p) * 1.15), 1);
  transform: scale(calc(1 + var(--banner-p) * 0.12))
    translate3d(0, calc(var(--banner-p) * -3%), 0);
  transform-origin: 40% 45%;
  will-change: filter, opacity, transform;
}

.hero-banner__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .hero-banner__inner {
    filter: none;
    transform: none;
    opacity: 1;
  }
}

/* On a phone the full 3:1 strip is only ~110px tall, too thin to carry
   the hero. Crop to 16:9 anchored left: keeps the wordmark, the tagline
   and his face, and drops only the badge on the far right. */
@media (max-width: 640px) {
  .hero-banner {
    aspect-ratio: 16 / 9;
  }

  .hero-banner__img {
    object-position: 25% center;
  }
}

/* =========================================================
   PROFILE / HERO (stacked: text over a full-width banner)
   ========================================================= */
#profile {
  display: grid;
  /* one column: the banner is 3:1, so it sits under the text
     rather than squeezing into a narrow side column */
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2.5rem;
  min-height: calc(100dvh - 72px);
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

/* Centred, not left-aligned: the banner under it runs the full width,
   so a left-hung text block leaves the composition lopsided. */
#profile .section__text {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#profile .section__text__p1 {
  margin-bottom: 0.4rem;
}

#profile .title {
  font-size: clamp(2.9rem, 6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0 0 0.6rem;
  color: var(--primary-color);
}

.section__text__p2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.3vw, 1.7rem);
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 1.1rem;
}

.hero-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted-color);
  max-width: 52ch;
  margin-inline: auto;
}

.section__pic-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

#profile .section__pic-container {
  position: relative;
}

.about-pic {
  border-radius: var(--radius-lg);
}

#socials-container {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1.85rem;
}

#socials-container .icon {
  height: 2.7rem;
  width: 2.7rem;
  padding: 0.55rem;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

#socials-container .icon-link:hover .icon,
#socials-container .icon:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

/* ---------- Icons ---------- */
.icon {
  cursor: pointer;
  height: 2rem;
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease),
    border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-color-1 {
  background: var(--primary-color);
  color: var(--bg-color);
  border: 1px solid var(--primary-color);
}

.btn-color-1:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-color-2 {
  background: var(--bg-elev);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn-color-2:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* CV Dropdown */
.cv-dropdown {
  position: relative;
  display: inline-block;
}

.cv-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-width: 210px;
}

.dropdown-arrow {
  font-size: 0.8rem;
  transition: transform 0.3s var(--ease);
}

.cv-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.cv-dropdown.open .cv-dropdown-btn {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.cv-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  right: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.97);
  transition: all 0.3s var(--ease);
  overflow: hidden;
}

.cv-dropdown.open .cv-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.cv-option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1.1rem;
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.cv-option:last-child {
  border-bottom: none;
}

.cv-option:hover {
  background: var(--accent-tint);
  padding-left: 1.4rem;
  color: var(--accent-strong);
}

.cv-option i {
  color: var(--accent-strong);
  font-size: 1.05rem;
}

/* =========================================================
   TECH MARQUEE (full-bleed)
   ========================================================= */
.tech-strip {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-subtle);
  padding: 1.5rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}

.tech-track {
  display: flex;
  width: max-content;
  animation: techscroll 40s linear infinite;
}

.tech-strip:hover .tech-track {
  animation-play-state: paused;
}

.tech-set {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  padding: 0 1.75rem;
}

.tech-set img {
  height: 34px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.5;
  transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}

.tech-set img:hover {
  filter: none;
  opacity: 1;
}

@keyframes techscroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* =========================================================
   ABOUT
   ========================================================= */
.section-container {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.5rem;
  align-items: start;
}

#about .about-pic {
  width: 100%;
  max-width: 330px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  /* A single hairline instead of the old three stacked rings. */
  box-shadow: 0 0 0 1px var(--border-color);
  border: none;
}

#about .section__pic-container {
  position: sticky;
  top: 6rem;
}

.about-details-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-containers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 1.1rem;
}

.details-container {
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: none;
  text-align: left;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.details-container:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.details-container > .icon {
  height: 2.1rem;
  cursor: default;
  margin-bottom: 0.6rem;
}

.details-container h3 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.text-left-list {
  list-style: none;
  text-align: left;
  color: var(--muted-color);
}

.text-left-list li + li {
  margin-top: 0.7rem;
}

.text-left-list h5 {
  color: var(--primary-color);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.text-left-list li p {
  font-size: 0.86rem;
  line-height: 1.5;
}

.lang-label {
  font-weight: 700;
  color: var(--text-color);
  display: inline-block;
  min-width: 4.5rem;
}

.text-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
}

.text-container p {
  font-size: 1rem;
  line-height: 1.8;
}

/* Section arrow */
.arrow {
  display: none;
}

/* =========================================================
   SKILLS / EXPERIENCE
   ========================================================= */
.experience-details-container .about-containers {
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
  gap: 1.75rem;
}

.experience-sub-title {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

#experience .details-container {
  padding: 1.9rem;
}

#experience .details-container:hover {
  transform: none;
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

#experience .article-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.skill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.skill:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  background: var(--bg-elev);
}

.skill > .icon,
.skill > .skill-fa {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  cursor: default;
}

.skill > .tech-icon {
  object-fit: contain;
}

.skill-meta {
  display: flex;
  align-items: center;
  min-width: 0;
}

.skill-meta h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

/* =========================================================
   PROJECTS
   ========================================================= */
#projects {
  max-width: 1180px;
}

/* Featured project rows */
.project-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  margin-bottom: 3.5rem;
}

/* A phone shot needs far less width than a browser shot, so the
   column tracks the shape of the media rather than splitting evenly. */
.project-feature[data-media="portrait"] {
  grid-template-columns: 0.68fr 1fr;
}

.project-feature[data-media="portrait"].reverse {
  grid-template-columns: 1fr 0.68fr;
}

.project-feature.reverse .project-feature-media {
  order: 2;
}

.project-feature-body {
  text-align: left;
}

.project-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent-strong);
  margin-bottom: 0.75rem;
}

.project-feature .project-title {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
  text-align: left;
}

.project-desc {
  text-align: left;
  color: var(--muted-color);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.3rem;
  max-width: 46ch;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  background: var(--accent-tint);
  color: var(--accent-strong);
  border: 1px solid transparent;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: var(--bg-color);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

.github-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--bg-color);
}

.github-btn i {
  font-size: 1.05rem;
}

/* =========================================================
   Project media — filmstrip carousel
   Each slider is sized to its own screenshots' native ratio
   (--shot), so shots sit edge to edge with no letterboxing.
   ========================================================= */
.project-feature-media {
  position: relative;
  display: flex;
  justify-content: center;
}

.project-slider {
  --frame-max: 100%;
  --slide-gap: 0px;
  position: relative;
  width: 100%;
  max-width: var(--frame-max);
}

/* Phone shots would be ~1200px tall at full column width, so cap
   them to a hand-held size and let the column breathe around it. */
.project-slider[data-orientation="portrait"] {
  --frame-max: 296px;
}

/* Ambient wash behind the narrow portrait frames — keeps the wide
   column from reading as empty space. Anchored to the column, not the
   frame: bleeding past the frame in percentages pushed the page wider
   than the viewport on phones. */
.project-feature[data-media="portrait"] .project-feature-media::before {
  content: "";
  position: absolute;
  inset: -4% 0 -3%;
  border-radius: 50%;
  background: radial-gradient(
    58% 48% at 50% 46%,
    var(--accent),
    transparent 72%
  );
  opacity: 0.16;
  filter: blur(6px);
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.45s var(--ease);
}

.project-feature[data-media="portrait"] .project-feature-media:hover::before {
  opacity: 0.24;
}

/* The frame is the artifact: it clips the strip, carries the
   elevation, and never pads the image. */
.project-frame {
  position: relative;
  aspect-ratio: var(--shot, 16 / 10);
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

.project-slider:hover .project-frame {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* These captures include the simulator's actual iPhone body and black corners.
   Crop only the simulator window controls surrounding the phone. */
.project-slider--phone .project-frame {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.project-slider--phone:hover .project-frame {
  box-shadow: none;
}

.project-slider--phone .phone-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
}

.project-slider--phone .project-shot {
  position: relative;
  top: -8.1%;
  left: -8.2%;
  width: 116.5%;
  height: auto;
  max-width: none;
}

/* One continuous strip — every shot moves together, not one
   fading over another. */
.project-track {
  display: flex;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: transform 0.72s var(--ease);
}

/* A recorded demo fills its frame exactly like a screenshot does. */
.project-clip {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: var(--bg-subtle);
}

.project-track.no-anim {
  transition: none;
}

.project-slide {
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
}

.project-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--shot-pos, center top);
  /* A touch of counter-drift so the strip reads with depth
     rather than as a flat sheet sliding past. */
  transition: transform 0.72s var(--ease);
}

/* ----- Controls ----- */
.slider-btn {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--bg-elev);
  color: var(--text-color);
  cursor: pointer;
  z-index: 2;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transition: opacity 0.28s var(--ease), background 0.2s var(--ease),
    color 0.2s var(--ease), transform 0.28s var(--ease);
}

.slider-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.slider-btn.prev {
  left: 10px;
  transform: translate(-6px, -50%);
}

.slider-btn.next {
  right: 10px;
  transform: translate(6px, -50%);
}

.project-slider:hover .slider-btn,
.project-slider:focus-within .slider-btn {
  opacity: 1;
  transform: translate(0, -50%);
}

.slider-btn:hover {
  background: var(--primary-color);
  color: var(--bg-color);
  border-color: var(--primary-color);
}

.slider-btn:focus-visible {
  opacity: 1;
  transform: translate(0, -50%);
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

/* ----- Dots double as the autoplay clock ----- */
.slider-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 1rem;
}

.slider-dot {
  position: relative;
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--border-color);
  cursor: pointer;
  overflow: hidden;
  transition: width 0.45s var(--ease), background 0.3s var(--ease);
}

.slider-dot:hover {
  background: var(--accent-soft);
}

.slider-dot[aria-current="true"] {
  width: 30px;
  background: var(--accent-tint);
}

/* The fill drains the dot in step with the autoplay timer, so the
   indicator reports how long the shot has left. */
.slider-dot[aria-current="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--accent-strong);
  transform-origin: left center;
  transform: scaleX(var(--fill, 0));
}

.slider-dot[aria-current="true"].animate::after {
  transition: transform linear var(--dur, 4600ms);
}

.slider-dot:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .project-track,
  .project-shot,
  .project-frame,
  .slider-dot[aria-current="true"]::after {
    transition: none;
  }

  .project-slider:hover .project-frame {
    transform: none;
  }

  .slider-btn {
    opacity: 1;
    transform: translate(0, -50%);
  }
}

/* Secondary project cards */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.project-card-mark {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 96px;
  height: 96px;
  opacity: 0.06;
  filter: grayscale(1);
  transform: rotate(-8deg);
  pointer-events: none;
}

.project-card .project-kicker {
  margin-bottom: 0.6rem;
}

.project-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.project-card-desc {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted-color);
  margin-bottom: 1.1rem;
  flex-grow: 1;
}

.project-card .project-tags {
  margin-bottom: 1.25rem;
}

.project-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-color);
  align-self: flex-start;
}

.project-card-link:hover {
  color: var(--accent-strong);
}

.projects-footer {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
  align-items: center;
}

.contact-media {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Contact illustration. An <img> rather than inline SVG: the file is
   ~360 KB, so it stays out of the document and gets cached and lazy
   loaded on its own. */
.contact-art {
  width: 100%;
  max-width: 320px;
  height: auto;
  margin-bottom: 0.5rem;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s var(--ease);
}

.contact-list li:hover {
  background: var(--accent-tint);
}

.contact-list i {
  color: var(--accent-strong);
  width: 1.2rem;
  text-align: center;
  font-size: 1.05rem;
}

.contact-list a {
  color: var(--text-color);
  font-size: 0.92rem;
  font-weight: 500;
  word-break: break-all;
}

.contact-list a:hover {
  color: var(--accent-strong);
}

.contact-form-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: none;
  padding: 2.4rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-color);
}

.form-input,
.form-textarea {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.96rem;
  background-color: var(--bg-color);
  color: var(--text-color);
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--muted-color);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit-btn {
  align-self: flex-start;
  margin-top: 0.25rem;
  padding: 0.85rem 2rem;
  background: var(--primary-color);
  color: var(--bg-color);
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

.form-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.form-submit-btn:active {
  transform: translateY(1px) scale(0.99);
}

.form-submit-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Honeypot — off-screen instead of display:none so bots still fill it */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.status-message {
  margin-top: 0.5rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
}

.status-message.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  max-height: 80px;
}

.status-message.success {
  background-color: rgba(34, 160, 90, 0.12);
  color: #1c7a47;
  border: 1px solid rgba(34, 160, 90, 0.3);
}

.status-message.error {
  background-color: rgba(214, 69, 69, 0.12);
  color: #b53636;
  border: 1px solid rgba(214, 69, 69, 0.3);
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  padding: 2.5rem 2rem 3rem;
  border-top: 1px solid var(--border-color);
}

footer nav {
  justify-content: center;
  margin-bottom: 1.25rem;
}

footer .nav-links {
  flex-wrap: wrap;
  justify-content: center;
}

footer .nav-links a {
  color: var(--muted-color);
}

footer p {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted-color);
}

/* =========================================================
   THEME TOGGLE
   ========================================================= */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s var(--ease);
}

.theme-toggle:hover {
  background: var(--accent-tint);
}

.theme-label-container {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 56px;
  justify-content: center;
}

.theme-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted-color);
}

.theme-icon {
  width: 15px;
  height: 15px;
}

.toggle-track {
  position: relative;
  width: 46px;
  height: 24px;
  background: var(--border-color);
  border-radius: var(--radius-pill);
  transition: background 0.3s var(--ease);
}

.toggle-thumb {
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  top: 3px;
  left: 3px;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

[data-theme="dark"] .toggle-track {
  background: var(--accent);
}

[data-theme="dark"] .toggle-thumb {
  transform: translateX(22px);
}

.theme-toggle:hover .toggle-thumb {
  transform: scale(1.06);
}

[data-theme="dark"] .theme-toggle:hover .toggle-thumb {
  transform: translateX(22px) scale(1.06);
}

[data-theme="dark"] .theme-label {
  color: var(--text-color);
}

.light-icon { display: block; }
.moon-icon { display: none; }

[data-theme="dark"] .light-icon { display: none !important; }
[data-theme="dark"] .moon-icon { display: block !important; }

/* Mobile theme toggle sizing */
.mobile-theme-toggle .theme-label { font-size: 0.66rem; }
.mobile-theme-toggle .theme-label-container { min-width: 42px; gap: 0.3rem; }
.mobile-theme-toggle .theme-icon { width: 13px; height: 13px; }
.mobile-theme-toggle .toggle-track { width: 34px; height: 18px; }
.mobile-theme-toggle .toggle-thumb { width: 13px; height: 13px; }
[data-theme="dark"] .mobile-theme-toggle .toggle-thumb { transform: translateX(16px); }
[data-theme="dark"] .mobile-theme-toggle:hover .toggle-thumb { transform: translateX(16px) scale(1.06); }

/* =========================================================
   BACK TO TOP + BOTTOM FADE
   ========================================================= */
#back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.75rem;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
    visibility 0.3s var(--ease), box-shadow 0.3s var(--ease);
  z-index: 80;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.back-to-top-icon {
  width: 20px;
  height: 20px;
  transform: rotate(180deg);
}

.bottom-fade-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 10vh;
  background: linear-gradient(to top, var(--bg-color) 0%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}

/* =========================================================
   LANGUAGE SWITCH (EN / TR)
   ========================================================= */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  background: var(--bg-elev);
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.26rem 0.62rem;
  border: none;
  background: transparent;
  color: var(--muted-color);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.lang-btn:hover {
  color: var(--text-color);
}

.lang-btn.active {
  background: var(--accent);
  color: #131211;
}

.lang-switch--mobile {
  align-self: flex-start;
  margin: 0 1.6rem 0.5rem;
}

/* =========================================================
   PROJECT CASE-STUDY: details button + modal
   ========================================================= */
.details-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-pill);
  background: var(--bg-elev);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.details-btn:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.details-btn i {
  font-size: 0.78rem;
  transition: transform 0.2s var(--ease);
}

.details-btn:hover i {
  transform: translateX(3px);
}

.details-btn.sm {
  padding: 0.5rem 1rem;
  font-size: 0.86rem;
}

/* secondary-card footer holds two actions */
.card-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: auto;
}

/* Modal */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.project-modal.open {
  opacity: 1;
  visibility: visible;
}

.project-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 19, 18, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.project-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  transform: translateY(18px) scale(0.98);
  transition: transform 0.35s var(--ease);
}

.project-modal.open .project-modal__dialog {
  transform: translateY(0) scale(1);
}

.project-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--muted-color);
  border: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    transform 0.3s var(--ease);
}

.project-modal__close:hover {
  background: var(--accent-tint);
  color: var(--accent-strong);
  transform: rotate(90deg);
}

.project-modal__kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent-strong);
  margin-bottom: 0.6rem;
}

.project-modal__title {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
  padding-right: 2rem;
}

.project-modal__overview {
  color: var(--muted-color);
  line-height: 1.7;
  margin-bottom: 1.9rem;
}

.project-modal__event {
  margin: 0 0 1.9rem;
}

.project-modal__event[hidden] {
  display: none;
}

.project-modal__event img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.project-modal__event figcaption {
  margin-top: 0.5rem;
  color: var(--muted-color);
  font-size: 0.82rem;
  line-height: 1.5;
}

.project-modal__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  margin-bottom: 1.9rem;
}

.project-modal__label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}

.project-modal__role + .project-modal__label {
  margin-top: 1.4rem;
}

.project-modal__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.project-modal__list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--muted-color);
  font-size: 0.94rem;
  line-height: 1.5;
}

.project-modal__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.project-modal__role {
  color: var(--muted-color);
  font-size: 0.94rem;
  line-height: 1.6;
}

.project-modal__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .project-modal__dialog {
    padding: 1.9rem 1.4rem;
  }
  .project-modal__grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }
  .project-modal__title {
    font-size: 1.5rem;
  }
}

/* =========================================================
   MOTION PREFERENCES
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .tech-track { animation: none; }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
