/* =========================================================
   Ayush Oli — Portfolio
   NeoBrutalism: thick borders, hard offset shadows, flat colour
   ========================================================= */

/* ---------- Theme tokens ---------- */
:root {
  --bg: #fbf7ec;          /* cream */
  --surface: #ffffff;
  --text: #0d0d0d;
  --muted: #3d3d3d;
  --border: #0d0d0d;
  --accent: #10b981;      /* emerald */
  --accent-strong: #047857;
  --accent-text: #0d0d0d; /* text on accent */
  --shadow-color: #0d0d0d;

  --bw: 3px;              /* border width */
  --shadow: 6px 6px 0 var(--shadow-color);
  --shadow-sm: 4px 4px 0 var(--shadow-color);
  --radius: 0px;

  --font: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --max: 1080px;
  --gutter: 16px;
}

:root[data-theme="dark"] {
  --bg: #0e1513;
  --surface: #17211e;
  --text: #f3efe4;
  --muted: #b9b4a7;
  --border: #f3efe4;
  --accent: #34d399;
  --accent-strong: #10b981;
  --accent-text: #0d0d0d;
  --shadow-color: #10b981;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Layout ---------- */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: 72px 0 0; }
.section__title {
  display: inline-block;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  background: var(--accent);
  color: var(--accent-text);
  border: var(--bw) solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 4px 14px;
  margin-bottom: 28px;
}
.subhead {
  font-size: 1.3rem;
  text-transform: uppercase;
  margin: 40px 0 16px;
}

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px var(--gutter);
  background: var(--bg);
  border-bottom: var(--bw) solid var(--border);
}
.nav__logo {
  font-weight: 700;
  font-size: 1.4rem;
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-text);
  border: var(--bw) solid var(--border);
  padding: 2px 10px;
}
.nav__links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav__links::-webkit-scrollbar { display: none; }
.nav__links a {
  font-weight: 500;
  text-decoration: none;
  padding: 6px 10px;
  border: var(--bw) solid transparent;
  white-space: nowrap;
}
.nav__links a:hover {
  border-color: var(--border);
  background: var(--surface);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: var(--bw) solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 10px 18px;
  cursor: pointer;
}
.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--shadow-color);
}
.btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}
.btn:focus-visible,
a:focus-visible {
  outline: 3px dashed var(--accent-strong);
  outline-offset: 3px;
}
.btn--primary { background: var(--accent); color: var(--accent-text); }
.btn--sm { font-size: 0.9rem; padding: 6px 12px; }
.btn--lg { font-size: clamp(1rem, 3.5vw, 1.3rem); padding: 14px 22px; word-break: break-all; }
.btn--icon {
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.theme-icon--dark { display: none; }
:root[data-theme="dark"] .theme-icon--light { display: none; }
:root[data-theme="dark"] .theme-icon--dark { display: inline; }

/* ---------- Hero ---------- */
.hero { padding-top: 64px; }
.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  background: var(--surface);
  border: var(--bw) solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 6px 14px;
  margin-bottom: 28px;
}
.flag { font-size: 1.3rem; line-height: 1; }
.arrow { color: var(--accent-strong); font-size: 1.3rem; }
:root[data-theme="dark"] .arrow { color: var(--accent); }

.hero__name {
  font-size: clamp(3.2rem, 13vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.hero__headline {
  font-size: clamp(1.4rem, 4.5vw, 2.4rem);
  font-weight: 700;
  margin: 12px 0 20px;
}
.highlight {
  background: var(--accent);
  color: var(--accent-text);
  padding: 0 8px;
  border: var(--bw) solid var(--border);
}
.hero__sub {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.15rem;
  margin-bottom: 32px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: var(--bw) solid var(--border);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card h3 { font-size: 1.4rem; margin-bottom: 10px; }
.card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.card__head h3 { margin: 0; }
.card--project { display: flex; flex-direction: column; gap: 14px; }
.card--project p { margin: 0; }
.card--project .btn { align-self: flex-start; }

.badge {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--accent-text);
  border: 2px solid var(--border);
  padding: 2px 8px;
}

.card__icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  background: var(--accent);
  color: var(--accent-text);
  border: var(--bw) solid var(--border);
  margin-bottom: 16px;
}
.link {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}
.link:hover { background: var(--accent); color: var(--accent-text); text-decoration: none; }

/* ---------- Tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 12px; }
.tag {
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--surface);
  border: var(--bw) solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 8px 16px;
}
.tags--sm { gap: 8px; }
.tags--sm:empty { display: none; }
.tag--sm { font-size: 0.85rem; padding: 3px 10px; box-shadow: none; border-width: 2px; }

/* ---------- Timeline ---------- */
.timeline { display: grid; gap: 20px; }
.timeline__item h3 { margin-bottom: 4px; }
.timeline__date {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-text);
  border: 2px solid var(--border);
  padding: 2px 10px;
  margin-bottom: 12px;
}
.timeline__org { color: var(--muted); font-weight: 500; margin: 0; }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.photo {
  margin: 0;
  aspect-ratio: 4 / 5;
  border: var(--bw) solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  background: var(--surface);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--empty {
  display: grid;
  place-items: center;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  border-style: dashed;
  box-shadow: none;
}

/* ---------- Contact ---------- */
.card--contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.contact__lead { font-size: 1.3rem; font-weight: 700; margin: 0; }
.contact__links { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 96px;
  padding: 24px var(--gutter);
  border-top: var(--bw) solid var(--border);
  text-align: center;
  font-weight: 500;
}
.footer p { margin: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding-top: 56px; }
  .nav { gap: 10px; }
  .card { padding: 18px; }
  .hero__actions .btn { flex: 1 1 auto; }
}
