:root {
  --bg: #0d1117;
  --panel: #1a1f2b;
  --panel-soft: #222938;
  --panel-strong: #101521;
  --line: #2f3748;
  --text: #f5f7fb;
  --muted: #b7bfd0;
  --accent: #f6c35c;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(246, 195, 92, 0.12), transparent 22%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.04), transparent 18%),
    linear-gradient(180deg, #0b0f16 0%, #111724 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.portfolio-shell {
  width: min(1240px, calc(100% - 2rem));
  margin: 2rem auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.card {
  background: linear-gradient(180deg, rgba(34, 41, 56, 0.98), rgba(21, 27, 38, 0.98));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.sidebar {
  position: sticky;
  top: 1.5rem;
  padding: 1.5rem;
}

.sidebar-top {
  text-align: center;
}

.avatar-wrap {
  width: 170px;
  height: 170px;
  margin: 0 auto 1.25rem;
  border-radius: 28px;
  overflow: hidden;
  background: var(--panel-strong);
  border: 1px solid rgba(246, 195, 92, 0.28);
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.sidebar h1 {
  margin: 0;
  font-size: 1.7rem;
}

.role-pill {
  display: inline-flex;
  margin-top: 0.9rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.88rem;
}

.contact-block {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1rem;
}

.contact-item {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.contact-item p,
.contact-item a {
  margin: 0.3rem 0 0;
  color: var(--text);
  font-size: 0.95rem;
  word-break: break-word;
}

.contact-label {
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.social-links a,
.resume-button,
.tab-button {
  transition: 180ms ease;
}

.social-links a {
  padding: 0.5rem 0.7rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.social-links a:hover,
.resume-button:hover,
.tab-button:hover {
  transform: translateY(-1px);
}

.content-panel {
  padding: 1.5rem;
}

.content-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.content-header h2 {
  margin: 0;
  font-size: 2rem;
}

.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tab-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 0.75rem 1rem;
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
}

.tab-button.active {
  color: #17130a;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-title.compact {
  margin-top: 2rem;
}

.section-title h3 {
  margin: 0;
  font-size: 1.45rem;
}

.section-title span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.tab-panel p {
  color: var(--muted);
  line-height: 1.8;
}

.info-grid,
.cert-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.mini-card,
.project-card,
.timeline-item {
  padding: 1.15rem;
  border-radius: 20px;
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mini-card h4,
.project-card h4,
.timeline-item h4 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.mini-card p,
.project-card p,
.timeline-item p {
  margin: 0;
}

.certificate-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.certificate-card img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #fff;
}

.certificate-copy {
  padding: 1rem 1.1rem 1.2rem;
}

.certificate-copy h4 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.certificate-copy p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chip-grid span {
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(246, 195, 92, 0.22);
  color: var(--text);
  font-size: 0.92rem;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-date,
.project-type {
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.timeline-item ul {
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.8;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: auto;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  background: rgba(246, 195, 92, 0.12);
  border: 1px solid rgba(246, 195, 92, 0.28);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
}

.project-link:hover {
  transform: translateY(-1px);
}

.contact-cta {
  margin-top: 1.5rem;
  padding: 1.3rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(246, 195, 92, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(246, 195, 92, 0.18);
}

.resume-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.8rem;
  padding: 0.8rem 1.1rem;
  border-radius: 14px;
  background: var(--accent);
  color: #18140b;
  font-weight: 600;
}

@media (max-width: 1024px) {
  .portfolio-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .portfolio-shell {
    width: min(100% - 1rem, 1240px);
    margin: 1rem auto;
  }

  .content-header,
  .section-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .info-grid,
  .cert-grid,
  .contact-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .content-header h2 {
    font-size: 1.7rem;
  }
}
