/* Murad Nabizade — personal site
   Plain CSS, one accent color, light background. */

:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --border: #e7e4dd;
  --text: #22262b;
  --muted: #5c636b;
  --accent: #1f6f6b;      /* deep teal */
  --accent-dark: #14514e;
  --max-width: 860px;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  /* soft, hand-placed accent texture — no images, no stock photos */
  background-image:
    radial-gradient(760px 420px at 88% -8%, rgba(31, 111, 107, 0.10), transparent 70%),
    radial-gradient(620px 380px at -6% 4%, rgba(31, 111, 107, 0.06), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { image-orientation: from-image; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { text-decoration: underline; }

/* ---------- Header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 8px;
}

.brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }

.nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.nav a {
  color: var(--muted);
  font-size: 15px;
}
.nav a.active {
  color: var(--text);
  font-weight: 600;
}
.nav a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Main / sections ---------- */

main {
  padding: 48px 0 64px;
}

.intro h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.intro .role {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 24px;
}

.lead {
  font-size: 19px;
  max-width: 640px;
}

h2 {
  font-size: 22px;
  margin: 44px 0 16px;
  letter-spacing: -0.01em;
  padding-left: 14px;
  position: relative;
}
h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
}

h3 {
  font-size: 18px;
  margin: 0 0 6px;
}

p { margin: 0 0 16px; }

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

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ---------- Highlight cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(20, 81, 78, 0.10);
  border-color: #d3e3e1;
}
.card h3 { margin-top: 0; }
.card p { margin-bottom: 0; color: var(--muted); font-size: 15px; }

/* ---------- Project list ---------- */

.project {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.project:first-of-type { border-top: 0; }
/* Project titles are h2 for correct heading order, but keep the compact card look
   (no full-height accent bar, no large section margins). */
.project h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 18px;
  margin: 0 0 6px;
  padding-left: 0;
}
.project h2::before { display: none; }
.project .tag {
  font-size: 12px;
  color: var(--accent-dark);
  background: #e6f0ef;
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 600;
}
.project p { margin-bottom: 0; color: var(--muted); }

/* ---------- Services / consulting ---------- */

.service {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 20px 0;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.service:hover {
  border-color: #d3e3e1;
  box-shadow: 0 8px 20px rgba(20, 81, 78, 0.08);
}
.service h2 {
  margin: 0 0 8px;
  padding-left: 0;
  font-size: 20px;
}
.service h2::before { display: none; }
.service > p { color: var(--muted); margin: 0 0 12px; }
.service .wyg {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
  margin: 14px 0 8px;
}
.service ul { margin: 0; padding-left: 20px; }
.service li { margin-bottom: 6px; color: var(--muted); }
.service .in-practice { margin: 14px 0 0; font-size: 14px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  background: var(--accent-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(20, 81, 78, 0.22);
}

.btn-outline {
  display: inline-block;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; transform: translateY(-1px); }

.link-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0 8px;
}

/* ---------- Content / video ---------- */

.videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Resume ---------- */

.resume-section { margin-bottom: 8px; }
.resume-item { padding: 16px 0; border-top: 1px solid var(--border); }
.resume-item:first-of-type { border-top: 0; }
.resume-item .meta {
  color: var(--muted);
  font-size: 14px;
  margin: 2px 0 8px;
}
.resume-item ul { margin: 8px 0 0; padding-left: 20px; }
.resume-item li { margin-bottom: 4px; color: var(--muted); }

.skills-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skills-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Impact stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 28px 0 8px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
/* Stats that link to their evidence (post/project that backs the number). */
a.stat {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
a.stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(20, 81, 78, 0.10);
  border-color: #d3e3e1;
  text-decoration: none;
}
a.stat .label { display: inline; }
a.stat .label .cite {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
a.stat:hover .label .cite { text-decoration: underline; }
.stat .num {
  font-size: 27px;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat .label {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Experience with logos ---------- */

.exp {
  display: flex;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.exp:first-of-type { border-top: 0; }
.exp .logo {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.exp .logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.exp .logo.text {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e6f0ef;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 20px;
}
.exp .body { flex: 1; min-width: 0; }
.exp h3 { margin-bottom: 2px; }
.exp .company { font-weight: 600; color: var(--text); }
.exp .meta { color: var(--muted); font-size: 14px; margin: 2px 0 8px; }
.exp ul { margin: 8px 0 0; padding-left: 20px; }
.exp li { margin-bottom: 5px; color: var(--muted); }
.exp li strong { color: var(--text); font-weight: 600; }

@media (max-width: 560px) {
  .exp { flex-direction: column; gap: 12px; }
}

/* ---------- Click-to-play video facade ---------- */

.yt {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: #000;
  aspect-ratio: 16 / 9;
}
.yt img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.94;
  transition: opacity 0.2s ease, transform 0.4s ease;
}
.yt:hover img,
.yt:focus-visible img { opacity: 1; transform: scale(1.03); }
.yt-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 70px;
  height: 48px;
  border-radius: 12px;
  background: rgba(20, 20, 20, 0.72);
  transition: background 0.18s ease, transform 0.18s ease;
}
.yt:hover .yt-btn,
.yt:focus-visible .yt-btn { background: #cc1f1f; transform: translateY(-1px) scale(1.05); }
.yt-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 16px;
  border-color: transparent transparent transparent #fff;
}

/* ---------- Channel card ---------- */

.channel-card {
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}
.channel-card .yt-mark {
  flex: 0 0 64px;
  width: 64px;
  height: 46px;
  border-radius: 12px;
  background: #cc1f1f;
  position: relative;
}
.channel-card .yt-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent #fff;
}
.channel-card h3 { margin: 0 0 4px; }
.channel-card p { margin: 0 0 12px; }
@media (max-width: 480px) {
  .channel-card { flex-direction: column; align-items: flex-start; }
}

/* ---------- Penalty shootout game ---------- */

.pk { margin: 18px 0 6px; }

.pk-scoreboard {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.pk-score {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  text-align: center;
}
.pk-score span {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-dark);
  line-height: 1.1;
}
.pk-score small { font-size: 12px; color: var(--muted); }

.pk-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: crosshair;
  user-select: none;
  touch-action: manipulation;
  background: #4f9e3f;
}
.pk-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.pk-stage.shake { animation: pkshake 0.4s ease; }
@keyframes pkshake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-5px, 3px); }
  40% { transform: translate(5px, -2px); }
  60% { transform: translate(-3px, 2px); }
  80% { transform: translate(3px, -1px); }
}

.pk-msg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  font-weight: 800;
  font-size: clamp(24px, 5.4vw, 46px);
  letter-spacing: 0.02em;
  color: #fff;
  padding: 10px 26px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}
.pk-msg.show { opacity: 1; animation: pkpop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1); }
.pk-msg.goal { background: rgba(31, 111, 107, 0.92); box-shadow: 0 12px 30px rgba(20, 81, 78, 0.4); }
.pk-msg.save { background: rgba(192, 57, 43, 0.92); box-shadow: 0 12px 30px rgba(120, 30, 20, 0.4); }
.pk-msg.miss { background: rgba(70, 78, 84, 0.92); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
@keyframes pkpop {
  0% { transform: translate(-50%, -50%) scale(0.4); }
  60% { transform: translate(-50%, -50%) scale(1.12); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.pk-hint {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  color: #14514e;
  background: rgba(255, 255, 255, 0.82);
  padding: 4px 12px;
  border-radius: 999px;
  z-index: 4;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}
.pk-stage.playing .pk-hint { opacity: 0; }

.pk-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.pk-btn {
  flex: 1;
  min-width: 90px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.pk-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.pk-btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.pk-reset { flex: 0 0 auto; min-width: 0; color: var(--muted); }

@media (max-width: 560px) {
  .pk-score span { font-size: 20px; }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0;
  color: var(--muted);
  font-size: 15px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  align-items: center;
}
.site-footer .contact { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Hero with photo ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 44px;
  align-items: center;
}

.hero-photo {
  position: relative;
  max-width: 340px;
  justify-self: center;
  width: 100%;
}
.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(20, 81, 78, 0.14);
}
/* subtle accent frame offset behind the photo */
.hero-photo::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 2px solid var(--accent);
  border-radius: 14px;
  opacity: 0.28;
  z-index: -1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--accent-dark);
  background: #e6f0ef;
  border: 1px solid #cfe3e0;
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 16px;
}
.badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Entrance animation (JS-free) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: reveal 0.6s cubic-bezier(0.16, 0.7, 0.3, 1) forwards;
  }
  .reveal.d1 { animation-delay: 0.06s; }
  .reveal.d2 { animation-delay: 0.14s; }
  .reveal.d3 { animation-delay: 0.22s; }
  .reveal.d4 { animation-delay: 0.30s; }
}
@keyframes reveal {
  to { opacity: 1; transform: none; }
}

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero-photo { max-width: 320px; }
  .hero-photo::before { inset: 12px -12px -12px 12px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .intro h1 { font-size: 28px; }
  .lead { font-size: 17px; }
  main { padding: 32px 0 48px; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; }
}

/* ---------- Accessibility ---------- */

/* Off-screen by default; only shown when focused via keyboard. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  overflow: visible;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(20, 81, 78, 0.28);
}

a:focus-visible,
button:focus-visible,
.pitch:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(31, 111, 107, 0.5);
  outline-offset: 2px;
  border-radius: 4px;
}
main:focus { outline: none; }
