/* ---------- Design tokens: change the look of the whole site here ---------- */
:root {
  --bg: #0e1220;
  --surface: #151b2e;
  --surface-2: #1c2440;
  --border: #2a3354;
  --text: #e8ebf5;
  --muted: #98a2c3;
  --accent: #f2b066; /* single accent colour */
  --accent-ink: #1a1305; /* text on accent */
  --radius: 10px;
  --max: 1000px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.7 var(--font);
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}
p {
  margin: 0 0 1rem;
  max-width: 68ch;
}
ul {
  margin: 0;
  padding-left: 1.2rem;
}
.container {
  width: min(var(--max), 100% - 2.5rem);
  margin-inline: auto;
}
.section {
  padding: 4.5rem 0 1rem;
}
.section > h2 {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 1.75rem;
}
.muted {
  color: var(--muted);
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem max(1.25rem, calc((100% - var(--max)) / 2));
  background: rgba(14, 18, 32, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav__brand {
  font-weight: 800;
}
.nav__links {
  display: flex;
  gap: 1.25rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.nav__links a:hover {
  color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  padding: 6rem 0 2rem;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
}
.hero__role {
  font-size: 1.25rem;
  color: var(--accent);
  margin: 0.75rem 0 1.25rem;
  font-weight: 700;
}
.hero__photo {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--surface);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.93rem;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.btn:hover {
  border-color: var(--accent);
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn--primary:hover {
  background: #f6c58f;
}

/* ---------- Skills ---------- */
.skills {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.skills h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}
.tag {
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* ---------- Experience ---------- */
.timeline {
  border-left: 2px solid var(--border);
  padding-left: 1.5rem;
  display: grid;
  gap: 2rem;
}
.job {
  position: relative;
}
.job::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 6px);
  top: 0.55rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.job h3 {
  font-size: 1.1rem;
}
.job__meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.15rem 0 0.6rem;
}
.job li {
  margin-bottom: 0.3rem;
  color: #c6cce3;
}

/* ---------- Projects ---------- */
.projects {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.project--featured {
  grid-column: 1 / -1;
  flex-direction: row;
}
.project__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--surface-2), var(--bg));
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.project--featured .project__media {
  flex: 0 0 45%;
  aspect-ratio: auto;
  min-height: 240px;
}
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project__body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}
.project h3 {
  font-size: 1.2rem;
}
.project ul {
  color: #c6cce3;
  font-size: 0.95rem;
}
.project ul.tags {
  color: inherit;
  font-size: inherit;
  padding: 0;
}
.project__links {
  margin-top: auto;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.project__links .btn {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}
/* Gallery controls */
.gallery__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(14, 18, 32, 0.8);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.gallery__btn:hover {
  border-color: var(--accent);
}
.gallery__btn--prev {
  left: 0.6rem;
}
.gallery__btn--next {
  right: 0.6rem;
}
.gallery__count {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: rgba(14, 18, 32, 0.8);
  font-size: 0.78rem;
  color: var(--text);
}
/* ---------- Certificates ---------- */
.certs {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.cert {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
}
.cert h3 {
  font-size: 1rem;
}
.cert p {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.cert a {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
}

/* ---------- Contact / footer ---------- */
#contact {
  padding-bottom: 3rem;
}
.contact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}
.contact h2 {
  font-size: 1.7rem;
  margin-bottom: 0.75rem;
}
.footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav__links {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 3.5rem;
  }
  .hero__photo {
    order: -1;
    width: 130px;
    height: 130px;
  }
  .project--featured {
    flex-direction: column;
  }
  .project--featured .project__media {
    flex-basis: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}
