/* ===== Portfolio — Renan Yilmaz ===== */
:root, [data-theme="dark"] {
  --bg: #0d0f14;
  --bg-alt: #11141b;
  --surface: #171b24;
  --surface-2: #1e2330;
  --border: #262c3a;
  --text: #e9ebf1;
  --muted: #9aa2b4;
  --accent: #ff7a3d;
  --accent-ink: #1a0d05;
  --accent-soft: rgba(255, 122, 61, .12);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
[data-theme="light"] {
  --bg: #f6f6f3;
  --bg-alt: #eeeee9;
  --surface: #ffffff;
  --surface-2: #f3f3ef;
  --border: #e2e2dc;
  --text: #15171c;
  --muted: #5d6372;
  --accent: #e0561a;
  --accent-ink: #ffffff;
  --accent-soft: rgba(224, 86, 26, .1);
  --shadow: 0 10px 30px rgba(20, 20, 30, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background .25s, color .25s;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: "Space Grotesk", "Inter", sans-serif; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 960px; }
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); }

/* ---- Top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: "Space Grotesk", sans-serif; font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.topnav { display: flex; align-items: center; gap: 22px; font-size: .95rem; }
.topnav > a { text-decoration: none; color: var(--muted); cursor: pointer; transition: color .2s; }
.topnav > a:hover { color: var(--text); }
.theme-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center;
}
.theme-btn:hover { border-color: var(--accent); }
[data-theme="dark"] .icon-light, [data-theme="light"] .icon-dark { display: none; }

/* ---- Buttons / tags ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem;
  transition: transform .15s, border-color .2s, background .2s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-block { width: 100%; margin-top: 10px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.tags li {
  font-size: .75rem; font-weight: 500; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.eyebrow { color: var(--accent); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 620px; margin: 16px 0 0; }
.socials { display: flex; gap: 6px; }
.socials a {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-size: 1.15rem; transition: color .2s, background .2s;
}
.socials a:hover { color: var(--accent); background: var(--accent-soft); }

/* ---- Profile (top) ---- */
.hero { display: flex; align-items: center; gap: 40px; }
.avatar { width: 160px; height: 160px; object-fit: contain; flex-shrink: 0; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; }


.info-grid { margin-top: 48px; display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.card-title { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.card-title i { color: var(--accent); font-size: .95rem; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 18px; display: flex; flex-direction: column; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -24px; top: 7px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--accent);
}
.timeline li:first-child::before { background: var(--accent); }
.timeline strong { font-weight: 600; }
.timeline .muted { font-size: .92rem; }
.timeline .date { font-size: .8rem; color: var(--muted); opacity: .8; }

.skill-groups { display: flex; flex-direction: column; gap: 16px; }
.skill-group h3 { font-family: "Inter", sans-serif; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.tags-neutral li { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); font-size: .8rem; }

/* ---- Projects (bottom) ---- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.section-head h2 { font-size: 2rem; }
.section-head p { margin: 0; }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project-card {
  display: flex; flex-direction: column; text-decoration: none; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.project-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.thumb-fallback {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 20px; text-align: center;
  font: 700 1.5rem/1.1 "Space Grotesk", sans-serif; color: #fff;
  background: radial-gradient(circle at 30% 20%, #2bb8ff 0%, transparent 55%), linear-gradient(135deg, #0a5bd8, #ff7a3d);
}
.project-spacer { height: 36px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.project-card:hover .thumb-fallback {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 20px; text-align: center;
  font: 700 1.5rem/1.1 "Space Grotesk", sans-serif; color: #fff;
  background: radial-gradient(circle at 30% 20%, #2bb8ff 0%, transparent 55%), linear-gradient(135deg, #0a5bd8, #ff7a3d);
}
.project-spacer { height: 36px; }
.thumb img { transform: scale(1.05); }
.project-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-body h3 { font-size: 1.25rem; }
.project-body p { margin: 0; }
.project-body .muted { font-size: .93rem; }
.project-meta { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; min-height: 1.2em; }
.more { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: .9rem; color: var(--accent); }
.more i { transition: transform .2s; }
.project-card:hover .more i { transform: translateX(4px); }

/* ---- Project page ---- */
.back { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); text-decoration: none; font-size: .95rem; margin-bottom: 32px; }
.back:hover { color: var(--accent); }
.project-head h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.project-head .tags { margin-top: 20px; }
.project-hero { margin: 36px 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.project-hero img { width: 100%; }
.project-content { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.prose h2 { font-size: 1.4rem; margin-bottom: 14px; }
.prose p { color: var(--muted); font-size: 1.05rem; margin: 0 0 14px; }
.project-side dl { margin: 0 0 8px; }
.project-side dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.project-side dd { margin: 2px 0 14px; font-weight: 500; }
.project-video { margin: 40px 0 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #000; }
.project-video video { display: block; width: 100%; height: auto; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.gallery img:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border); }
.pager a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 1.1rem; }
.pager a .muted { font-family: "Inter", sans-serif; font-weight: 400; font-size: .85rem; }
.pager a:hover { color: var(--accent); }
.pager .right { text-align: right; margin-left: auto; }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
  .info-grid .card:first-child { grid-column: 1 / -1; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-content { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .section { padding: 44px 0; }
  .hero { flex-direction: column; align-items: flex-start; gap: 24px; }
  .avatar { width: 112px; height: 112px; }
  .info-grid, .projects-grid, .gallery { grid-template-columns: 1fr; }
  .topnav { gap: 14px; }
  .topnav > a[href="/#profile"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
