/* =========================================================
   Onur Birsöz — Portfolio
   Modern dark design system
   ========================================================= */

:root {
  --bg: #070b12;
  --bg-soft: #0c121b;
  --surface: #111926;
  --surface-2: #16202f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eaf0f7;
  --muted: #93a2b8;
  --muted-2: #64748b;

  --accent: #45e0c4;       /* teal — mathematics / tech */
  --accent-soft: rgba(69, 224, 196, 0.14);
  --accent-2: #f2b544;     /* amber — bass / music */
  --accent-2-soft: rgba(242, 181, 68, 0.14);
  --accent-3: #ef5b6b;     /* red — chess */
  --accent-3-soft: rgba(239, 91, 107, 0.14);

  --radius: 18px;
  --radius-sm: 10px;
  --maxw: 1080px;

  --font-sans: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 15% -10%, #0e1b22 0%, transparent 55%),
              radial-gradient(1000px 700px at 110% 10%, #1a1420 0%, transparent 50%),
              var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #04140f; }

/* ---------- background watermark patterns ---------- */
.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-repeat: repeat;
  opacity: 0.07;
  filter: saturate(0);
}
.bg-pattern.bg-bass  { background-image: url('../img/pattern-bass.svg');  background-size: 340px 340px; }
.bg-pattern.bg-math  { background-image: url('../img/pattern-math.svg');  background-size: 420px 420px; }
.bg-pattern.bg-chess { background-image: url('../img/pattern-chess.svg'); background-size: 360px 360px; }

.bg-pattern.layer-2 {
  z-index: -2;
  opacity: 0.045;
  transform: scale(1.4) rotate(6deg);
}

/* ---------- layout helpers ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- navigation ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  background: rgba(7, 11, 18, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px var(--accent);
}
.nav-right { display: flex; align-items: center; gap: 14px; }

nav.main-nav { display: flex; gap: 6px; }
nav.main-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--muted);
  transition: color .2s ease, background .2s ease;
  white-space: nowrap;
}
nav.main-nav a:hover { color: var(--text); background: var(--surface); }
nav.main-nav a.active { color: var(--bg); background: var(--accent); font-weight: 600; }

/* ---------- language switcher ---------- */
.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.lang-switch button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active {
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* ---------- hamburger toggle (mobile) ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  nav.main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 10px 20px 18px;
    background: rgba(7, 11, 18, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .3s ease, opacity .25s ease, padding .3s ease;
  }
  nav.main-nav.open { max-height: 320px; opacity: 1; }
  nav.main-nav a { padding: 12px 14px; border-radius: 10px; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 64px;
  text-align: left;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(69, 224, 196, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}
.hero p.lead {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 0 32px;
}
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--line-strong);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #2bb8a0);
  color: #04140f;
  border: none;
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(69,224,196,.5); }

/* ---------- focus pills / tags ---------- */
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.pill {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
}

/* ---------- section generic ---------- */
section { padding: 60px 0; }
.section-head { margin-bottom: 40px; }
.section-head .kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  display: block;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 8px; letter-spacing: -0.01em; }
.section-head p { color: var(--muted); max-width: 620px; margin: 0; }

/* ---------- cards grid (home) ---------- */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 820px) { .grid-cards { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card .icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 18px;
}
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card a.card-link { position: absolute; inset: 0; }

.card.teal .icon { background: var(--accent-soft); color: var(--accent); }
.card.amber .icon { background: var(--accent-2-soft); color: var(--accent-2); }
.card.red .icon { background: var(--accent-3-soft); color: var(--accent-3); }

/* ---------- timeline (Lebenslauf) ---------- */
.timeline { position: relative; margin-top: 10px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--line) 90%);
}
.tl-item {
  position: relative;
  padding-left: 44px;
  margin-bottom: 30px;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: 4px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.tl-item.current::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
}
.tl-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.tl-period {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
}
.tl-card h3 { margin: 0; font-size: 1.08rem; }
.tl-card .company { color: var(--muted-2); font-size: 0.9rem; margin: 2px 0 10px; }
.tl-card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tl-card .tags span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
}
.tl-card p.desc { margin: 0; color: var(--muted); font-size: 0.94rem; }
.tl-card blockquote .quote-label {
  display: inline-block;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  color: var(--muted-2);
  opacity: 0.75;
  margin-bottom: 4px;
}
.tl-card blockquote {
  margin: 10px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--muted-2);
  font-style: italic;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- hero with side image (e.g. music page) ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-media img {
  width: 75%;
  opacity: 0.15;
  transition: opacity .3s ease;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: block;
}
.hero-media img:hover { opacity: 0.75; }

.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.info-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.info-list li strong { font-weight: 600; }
.info-list li span.meta { color: var(--muted); font-family: var(--font-mono); font-size: 0.85rem; }

/* ---------- equipment / music list ---------- */
.equip-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.equip-table th, .equip-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}
.equip-table th { color: var(--muted-2); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }

.band-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.band-tags span {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.92rem;
}

.soundcloud-embed {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-top: 20px;
}

/* ---------- footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 60px;
  margin-top: 40px;
  color: var(--muted-2);
  font-size: 0.88rem;
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-right { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer-right .sep { opacity: 0.5; }
.footer-right a { color: var(--muted-2); text-decoration: none; }
.footer-right a:hover { color: var(--text); text-decoration: underline; }

/* ---------- legal / impressum page ---------- */
.legal-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 720px;
}
.legal-card p { margin: 0 0 22px; color: var(--muted); line-height: 1.7; }
.legal-card p:last-of-type { margin-bottom: 0; }
.legal-card strong { color: var(--text); }
.legal-card a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal-disclaimer {
  margin-top: 24px;
  padding: 18px 20px;
  border-left: 3px solid var(--accent-3);
  background: var(--accent-3-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.legal-disclaimer strong { display: block; margin-bottom: 8px; color: var(--text); }
.legal-disclaimer p { margin: 0; font-size: 0.92rem; color: var(--muted); font-style: italic; }

/* ---------- misc ---------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
}

/* ---------- entrance animation (progressive enhancement) ---------- */
/* Elements are fully visible by default; JS only adds the .reveal class,
   so content never depends on JS/IntersectionObserver to be seen. */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 640px) {
  nav.main-nav { gap: 2px; }
  nav.main-nav a { padding: 7px 10px; font-size: 0.86rem; }
  .hero { padding: 64px 0 40px; }
}

/* =========================================================
   Visual effects — widely supported (evergreen Chrome, Firefox,
   Safari, Edge). Everything degrades gracefully: base layout and
   text stay fully readable if a given effect is unsupported or
   prefers-reduced-motion is set.
   ========================================================= */

/* ---------- scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  z-index: 999;
  transition: width .1s linear;
}

/* ---------- ambient cursor glow (desktop / pointer devices only) ---------- */
.cursor-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(480px circle at var(--gx, 50%) var(--gy, 30%), rgba(69, 224, 196, 0.10), transparent 60%);
  transition: background-position .1s ease;
}
@media (hover: none), (pointer: coarse) {
  .cursor-glow { display: none; }
}

/* ---------- aurora blobs (hero backdrop) ---------- */
.aurora { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.aurora .blob {
  position: absolute;
  width: 46vw;
  height: 46vw;
  max-width: 560px;
  max-height: 560px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.32;
  will-change: transform;
  animation: drift 22s ease-in-out infinite alternate;
}
.aurora .blob.a { background: radial-gradient(circle, var(--accent), transparent 70%); top: -12%; left: -8%; }
.aurora .blob.b { background: radial-gradient(circle, var(--accent-2), transparent 70%); top: 6%; right: -12%; animation-duration: 26s; animation-delay: -6s; }
.aurora .blob.c { background: radial-gradient(circle, var(--accent-3), transparent 70%); bottom: -18%; left: 22%; animation-duration: 30s; animation-delay: -12s; opacity: 0.2; }

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(4%, 6%) scale(1.08); }
  100% { transform: translate(-5%, -3%) scale(0.96); }
}

/* ---------- gradient shimmer on accent text ---------- */
/* Calm, static accent color — no attention-grabbing shimmer animation. */
.hero h1 .accent { color: var(--accent); }

/* ---------- spotlight + tilt hover on cards ---------- */
.card, .profile-link {
  --mx: 50%;
  --my: 50%;
  transform-style: preserve-3d;
  will-change: transform;
}
.card::after, .profile-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx) var(--my), rgba(255,255,255,0.10), transparent 60%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.card:hover::after, .profile-link:hover::after { opacity: 1; }

/* ---------- stats / counters ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 10px;
}
@media (max-width: 820px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-align: left;
}
.stat-card .num {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}
.stat-card .label { color: var(--muted); font-size: 0.88rem; }

/* ---------- marquee (band names ticker) ---------- */
.marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee .marquee-track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .marquee-track span {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.92rem;
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- page load fade-in ---------- */
body { animation: page-fade .5s ease both; }
@keyframes page-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- reduced motion: disable all decorative animation ---------- */
@media (prefers-reduced-motion: reduce) {
  .aurora .blob { animation: none; }
  .marquee .marquee-track { animation: none; }
  body { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- chess profile links ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 640px) { .profile-grid { grid-template-columns: 1fr; } }

.profile-link {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: transform .2s ease, border-color .2s ease;
}
.profile-link:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.profile-icon {
  font-size: 2rem;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--accent-3-soft);
  flex-shrink: 0;
}
.profile-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.profile-platform { font-weight: 600; }
.profile-username {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- chess puzzle box ---------- */
.puzzle-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.puzzle-frame {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  aspect-ratio: 1 / 1;
}
.puzzle-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #b58863;
}