/*
  Black & White, lightweight, highly responsive
  Author: Hossein Safaverdi (About Me)
*/

:root {
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --muted: #bdbdbd;
  --accent: #ffffff;
  --card: #111111;
  --border: #1d1d1d;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  color: var(--fg);
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(255,255,255,.07), transparent 60%),
    radial-gradient(900px 600px at -10% 100%, rgba(255,255,255,.04), transparent 60%),
    linear-gradient(180deg, #0b0b0b, #0a0a0a);
  background-attachment: fixed;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px clamp(16px, 5vw, 56px) 56px;
}

.header {
  text-align: left;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #131313, #0e0e0e);
  border: 1px solid var(--border);
  color: var(--fg);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 10px;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.cv-desktop { display: none; }

.cv-button svg { width: 14px; height: 14px; fill: currentColor; }

.cv-button:hover { transform: translateY(-2px); border-color: #2a2a2a; }
.cv-button:active { transform: translateY(0); }

.title {
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.title::after {
  content: "";
  display: block;
  width: clamp(72px, 18vw, 140px);
  height: 2px;
  margin-top: 10px;
  background: linear-gradient(90deg, #fff, rgba(255,255,255,0));
}

.subtitle {
  margin: clamp(6px, 1.2vw, 14px) 0 0 0;
  color: var(--muted);
  font-weight: 400;
  font-size: clamp(14px, 2.5vw, 16px);
}

.hr {
  height: 1px;
  background: linear-gradient(90deg, transparent, #202020 10%, #202020 90%, transparent);
  margin: 28px 0 20px;
  border: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(14px, 2.5vw, 24px);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(14px, 2.2vw, 20px) clamp(14px, 2.8vw, 24px);
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}

.card p {
  margin: 0;
  line-height: 1.7;
  color: #e6e6e6;
}

/* Structured list for highlights */
.list {
  margin: 0;
  padding-left: 18px;
  color: #e8e8e8;
}
.list li { margin: 6px 0; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border: 1px solid var(--border);
  background: #0d0d0d;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--fg);
}

/* KPI row */
.kpis {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(8px, 2vw, 14px);
}
.kpi {
  background: linear-gradient(135deg, #0c0c0c, #0a0a0a);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.kpi strong {
  font-size: 18px;
  letter-spacing: .02em;
}
.kpi span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(8px, 2vw, 14px);
}

.link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #0e0e0e, #0b0b0b);
  border: 1px solid var(--border);
  color: var(--fg);
  text-decoration: none;
  padding: 12px;
  border-radius: 12px;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.link:hover { transform: translateY(-2px); border-color: #2a2a2a; }
.link:active { transform: translateY(0); }

.link svg { width: 18px; height: 18px; fill: currentColor; }

/* Pill badge */
.pill {
  display: inline-block;
  border: 1px solid var(--border);
  background: #0d0d0d;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.footer {
  margin-top: 26px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* Animation for sections */
.animated {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .5s ease-out, transform .5s ease-out;
}

.animated.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile-first adjustments */
@media (max-width: 820px) {
  .container { padding: 20px clamp(12px, 5vw, 40px) 40px; }
}

@media (max-width: 600px) {
  .header { text-align: center; }
  .title::after { margin-left: auto; margin-right: auto; }
  .header-row { flex-direction: column; gap: 10px; }
  .cv-button { width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr; }
  .links { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .container { padding: 18px 12px 32px; }
  .card { padding: 12px 14px; }
  .list { padding-left: 16px; }
}

@media (min-width: 601px) {
  .cv-mobile { display: none; }
  .cv-desktop { display: inline-flex; }
}

/* Wide screens: give content a bit more breathing room */
@media (min-width: 1280px) {
  .container { max-width: 1400px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .link { transition: none; }
}
