/* mustafaergen.com — light gradient theme (same family as trust-fabric / ambeent) */
:root {
  --bg: #ffffff;
  --bg-alt: #f4f6fd;
  --border: #e1e7f3;
  --text: #14173f;
  --muted: #5a6585;
  --accent: #6a4ff0;
  --pink: #e0369b;
  --grad: linear-gradient(90deg, #f9a03f, #e0369b, #8a4fe9, #38b6ff);
  --grad-btn: linear-gradient(90deg, #e0369b, #8a4fe9, #4a5cf0);
  --shadow: 0 10px 30px rgba(20, 23, 63, 0.08);
  --radius: 18px;
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--accent); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Language toggle: TR is the default; EN hides [lang="tr"] blocks and vice versa */
:root[data-lang="en"] body [lang="tr"],
:root:not([data-lang="en"]) body [lang="en"] { display: none !important; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.logo { font-size: 1.3rem; font-weight: 800; color: var(--text); text-decoration: none; letter-spacing: -0.02em; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.lang-toggle {
  display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; background: #fff;
}
.lang-toggle button {
  font: inherit; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em;
  border: 0; background: transparent; color: var(--muted); padding: 5px 11px; border-radius: 999px; cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] { background: var(--text); color: #fff; }
.nav-right { display: flex; align-items: center; gap: 18px; }

/* Buttons */
.btn {
  display: inline-block; background: var(--grad-btn); color: #fff !important;
  padding: 13px 26px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(138, 79, 233, 0.28);
  transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(138, 79, 233, 0.34); }
.btn-ghost { background: #fff; border: 2px solid var(--text); color: var(--text) !important; box-shadow: none; padding: 11px 24px; }
.btn-ghost:hover { box-shadow: var(--shadow); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 84px 0 72px; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; z-index: -1;
}
.hero::before { width: 520px; height: 520px; background: #f7b3d8; top: -180px; right: -120px; }
.hero::after { width: 460px; height: 460px; background: #b9d8ff; bottom: -220px; left: -160px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 800; }
.hero .roles { font-size: clamp(1.15rem, 2.4vw, 1.6rem); font-weight: 700; margin: 14px 0 20px; letter-spacing: -0.01em; }
.hero .lead { font-size: 1.08rem; color: var(--muted); max-width: 580px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.portrait { position: relative; justify-self: center; width: min(340px, 80vw); aspect-ratio: 1; }
.portrait::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%; background: var(--grad);
  animation: spin 14s linear infinite;
}
.portrait img { position: relative; width: 100%; height: 100%; border-radius: 50%; border: 6px solid #fff; background: #fff; object-fit: cover; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .portrait::before { animation: none; } html { scroll-behavior: auto; } }

/* Compact hero: content (writing, videos) starts right below */
.hero-mini { display: grid; grid-template-columns: 132px 1fr; gap: 32px; align-items: center; }
.hero:has(.hero-mini) { padding: 44px 0 20px; }
.hero-mini .avatar {
  width: 132px; height: 132px; border-radius: 50%; object-fit: cover;
  border: 4px solid #fff; box-shadow: 0 0 0 3px #e0369b, 0 0 0 6px #8a4fe9, var(--shadow);
}
.hero-mini h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); line-height: 1.08; }
.hero-mini .roles { margin: 6px 0 6px; font-size: clamp(1rem, 2vw, 1.25rem); }
.hero-mini .lead { font-size: 1rem; }
#yazilar { padding-top: 40px; }
.writing-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
.writing-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); letter-spacing: -0.02em; }
.writing-head .outlets { margin: 0; }
.cv-link { margin: -16px 0 32px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.stat span { font-size: 0.85rem; color: var(--muted); }

/* Sections */
section { padding: 88px 0; }
.alt { background: var(--bg-alt); }
.section-head { max-width: 700px; margin-bottom: 44px; }
.section-head .kicker { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pink); }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); line-height: 1.15; letter-spacing: -0.025em; margin: 8px 0 12px; }
.section-head p { color: var(--muted); font-size: 1.02rem; }

/* Ventures */
.ventures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.venture {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  text-decoration: none; color: var(--text); box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.venture::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: var(--radius) var(--radius) 0 0; background: var(--grad); opacity: 0; transition: opacity .15s; }
.venture:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(20, 23, 63, 0.12); }
.venture:hover::before { opacity: 1; }
.venture h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
.venture .tag { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.venture p { color: var(--muted); font-size: 0.93rem; flex: 1; }
.venture .url { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.venture .url::after { content: " →"; }
.venture.highlight { background: var(--text); color: #fff; border-color: var(--text); }
.venture.highlight p { color: #c9cde6; }
.venture.highlight .url { color: #fff; }
.venture.highlight .tag { color: #f7a8d5; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
.about-text p { margin-bottom: 16px; color: #2c3156; }
.honors { list-style: none; margin-top: 24px; display: grid; gap: 10px; }
.honors li { padding-left: 28px; position: relative; font-size: 0.95rem; color: var(--muted); }
.honors li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 14px; height: 14px; border-radius: 50%; background: var(--grad); }
.timeline { list-style: none; border-left: 2px solid var(--border); padding-left: 26px; }
.timeline li { position: relative; padding-bottom: 22px; }
.timeline li::before { content: ""; position: absolute; left: -33px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.timeline .yr { font-size: 0.8rem; font-weight: 700; color: var(--pink); letter-spacing: 0.04em; }
.timeline .ev { display: block; font-weight: 600; line-height: 1.4; }
.timeline .ev small { display: block; font-weight: 400; color: var(--muted); font-size: 0.88rem; margin-top: 2px; }

/* Books */
.books { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
.book-feature {
  display: grid; grid-template-columns: 170px 1fr; gap: 28px; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.book-feature img { border-radius: 6px; box-shadow: 0 14px 30px rgba(20, 23, 63, 0.25); }
.book-feature h3 { font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.2; }
.book-feature .sub { color: var(--pink); font-weight: 600; margin: 4px 0 10px; }
.book-feature p { color: var(--muted); font-size: 0.93rem; margin-bottom: 18px; }
.book-list { list-style: none; display: grid; gap: 14px; }
.book-list li { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.book-list a { color: var(--text); font-weight: 600; text-decoration: none; }
.book-list a:hover { color: var(--accent); }
.book-list span { display: block; font-size: 0.86rem; color: var(--muted); }

/* Academia */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.card h3 { font-size: 1.08rem; margin-bottom: 12px; }
.card ul { list-style: none; display: grid; gap: 10px; }
.card li { font-size: 0.92rem; color: var(--muted); line-height: 1.5; }
.card li strong { color: var(--text); font-weight: 600; }
.card a { text-decoration: none; font-weight: 500; }
.card a:hover { text-decoration: underline; }
.card .notes-link { display: inline-block; margin-top: 4px; font-size: 0.86rem; font-weight: 600; }
.card .notes-link::before { content: "↓ "; }

/* Archive */
.archive-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 0.85rem; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--muted); padding: 7px 15px; border-radius: 999px;
}
.chip:hover { color: var(--text); border-color: #c7d0e6; }
.chip[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.chip .n { opacity: .6; margin-left: 4px; font-size: 0.78rem; }
.search {
  font: inherit; font-size: 0.92rem; border: 1px solid var(--border); border-radius: 999px; padding: 9px 18px;
  min-width: 240px; background: #fff; color: var(--text); outline: none;
}
.search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(106, 79, 240, 0.15); }
.year-group { display: grid; grid-template-columns: 90px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--border); }
.year-group > h3 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; color: #c3c9de; }
.items { list-style: none; display: grid; gap: 4px; }
.items li a, .items li .nolink {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: baseline;
  padding: 10px 14px; border-radius: 12px; text-decoration: none; color: var(--text);
}
.items li a:hover { background: var(--bg-alt); }
.items .t { font-weight: 500; line-height: 1.45; }
.items .o { font-size: 0.85rem; color: var(--muted); grid-column: 1; }
.items .c {
  grid-row: 1 / span 2; grid-column: 2; align-self: center;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; background: var(--bg-alt); color: var(--muted); white-space: nowrap;
}
.items .c.tv { background: #fde7f3; color: #b4237a; }
.items .c.yazi { background: #ece8fe; color: #5a3fd6; }
.items .c.konusma { background: #e1f1ff; color: #1f6fb5; }
.items .c.roportaj { background: #fff1df; color: #b4630f; }
.items .c.yayin { background: #e3f6ee; color: #0e7c56; }
.items .c.kesit { background: #fdeee9; color: #b5482a; }
.archive-empty { color: var(--muted); padding: 24px 0; display: none; }
.archive-note { margin-top: 24px; font-size: 0.85rem; color: var(--muted); }

/* Recent writing */
.writing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 56px; }
.post {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.post:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c7d0e6; }
.post .src { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pink); }
.post h3 { font-size: 1.04rem; line-height: 1.4; font-weight: 600; flex: 1; }
.post .d { font-size: 0.82rem; color: var(--muted); }
.outlets { display: flex; flex-wrap: wrap; gap: 8px; margin: -28px 0 40px; }
.outlets a {
  font-size: 0.82rem; font-weight: 600; text-decoration: none; color: var(--muted);
  border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 14px;
}
.outlets a:hover { color: var(--accent); border-color: var(--accent); }
.subhead { font-size: 1.25rem; letter-spacing: -0.01em; margin: 0 0 18px; }

/* Featured: most-watched video + most-read essay, right under the hero */
.featured { padding: 8px 0 64px; }
.featured-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: stretch; }
.feat-label { display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.feat-video h3 { font-size: 1.35rem; line-height: 1.3; margin-top: 14px; }
.feat-video p { font-size: 0.88rem; color: var(--muted); margin-top: 4px; }
.feat-post {
  display: flex; flex-direction: column; text-decoration: none; color: #fff;
  background: var(--text); border-radius: var(--radius); padding: 32px;
  transition: background .15s ease;
}
.feat-post:hover { background: #22255a; }
.feat-post .feat-label { color: #b8adff; }
.feat-post h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; letter-spacing: -0.015em; }
.feat-post .excerpt { color: #c9cbe0; font-size: 0.98rem; line-height: 1.65; margin: 16px 0 24px; flex: 1; }
.feat-post .d { font-size: 0.88rem; font-weight: 600; color: #fff; }
.feat-subhead { font-size: 1.15rem; letter-spacing: -0.01em; margin: 40px 0 16px; }
.featured-more { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px 18px; }
.feat-tag {
  display: inline-block; vertical-align: 2px; margin-right: 4px; padding: 2px 8px; border-radius: 999px;
  font-family: 'Inter', sans-serif; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--accent); color: #fff;
}
.featured-more .video h3 { font-size: 0.95rem; }

/* Videos */
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 20px; }
.video h3 { font-size: 0.98rem; line-height: 1.4; font-weight: 600; margin-top: 12px; }
.video p { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.yt, .video iframe {
  display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; overflow: hidden; background: #14173f;
}
.yt { position: relative; cursor: pointer; padding: 0; }
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, opacity .3s; opacity: .92; }
.yt::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%;
  background: var(--grad-btn); box-shadow: 0 6px 18px rgba(20, 23, 63, .35); transition: transform .2s;
}
.yt::before {
  content: ""; position: absolute; z-index: 1; top: 50%; left: 50%; margin: -9px 0 0 -5px;
  border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff;
}
.yt img.vertical { object-position: center 38%; }
.yt:hover img, .yt:focus-visible img { transform: scale(1.04); opacity: 1; }
.yt:hover::after, .yt:focus-visible::after { transform: scale(1.1); }
.yt:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.more-link { display: inline-block; margin-top: 32px; font-weight: 600; text-decoration: none; }
.more-link::after { content: " →"; }

/* Contact */
.contact { text-align: center; }
.contact .section-head { margin: 0 auto 32px; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.contact-links a {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-weight: 500;
  border: 1px solid var(--border); border-radius: 999px; padding: 10px 20px; background: #fff;
}
.contact-links a:hover { border-color: var(--accent); color: var(--accent); }
.contact-links a.btn { color: #fff; border: 0; }

footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: 0.85rem; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer a { color: var(--muted); }

/* Responsive */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hero-grid, .about-grid, .books { grid-template-columns: 1fr; }
  .portrait { order: -1; width: min(240px, 60vw); }
  .ventures, .cards3, .writing, .videos { grid-template-columns: 1fr 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-more { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  section { padding: 64px 0; }
  .hero { padding: 48px 0 56px; }
  .ventures, .cards3, .writing, .videos, .featured-more { grid-template-columns: 1fr; }
  .book-feature { grid-template-columns: 1fr; }
  .book-feature img { max-width: 170px; }
  .year-group { grid-template-columns: 1fr; gap: 6px; }
  .hero-mini { grid-template-columns: 84px 1fr; gap: 18px; }
  .hero-mini .avatar { width: 84px; height: 84px; }
  .hero-mini .lead { display: none; }
  #yazilar { padding-top: 28px; }
  .search { min-width: 0; width: 100%; }
  .items .c { display: none; }
}
