:root {
  --bg: #131417;
  --panel: #1e1f24;
  --panel-2: #25262c;
  --border: #2c2d34;
  --text: #e6e6e6;
  --text-soft: #b0b1b6;
  --text-muted: #7d7e85;
  --accent: #ffb648;
  --accent-soft: #ffcd77;
  --radius: 16px;
  --shadow: 0 20px 40px rgba(0,0,0,.35);
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* LAYOUT */
.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 28px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: start;
}

/* SIDEBAR */
.sidebar {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: sticky;
  top: 40px;
  text-align: center;
  box-shadow: var(--shadow);
}

.avatar {
  width: 150px;
  height: 150px;
  border-radius: 18px;
  overflow: hidden;
  margin: 0 auto 18px;
  background: var(--panel-2);
  box-shadow: 0 8px 22px rgba(0,0,0,.4);
}
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.05);
}

.name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.role {
  display: inline-block;
  background: var(--panel-2);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 22px 0;
}

.contact {
  list-style: none;
  text-align: left;
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}
.contact li {
  display: flex;
  gap: 12px;
  align-items: center;
}
.icon-box {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--accent);
  flex-shrink: 0;
}
.contact .label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.contact a, .contact span:not(.label):not(.icon-box) {
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
}
.contact a:hover { color: var(--accent); }

.socials {
  display: flex;
  justify-content: center;
  gap: 14px;
}
.socials a {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  color: var(--text-soft);
  border-radius: 8px;
  transition: color .2s, transform .2s;
}
.socials a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* CONTENT */
.content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 44px;
  position: relative;
  min-height: 600px;
  box-shadow: var(--shadow);
}

/* NAV */
.topnav {
  position: absolute;
  top: 28px;
  right: 32px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
  display: flex;
  gap: 4px;
}
.nav-link {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--accent); }
.nav-link.active {
  color: var(--accent);
  background: var(--panel-2);
}

/* PANELS */
.panel { display: none; animation: fadeIn .35s ease; }
.panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-header {
  margin-bottom: 32px;
  padding-top: 8px;
}
.panel-header h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.accent-line {
  display: block;
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.intro {
  color: var(--text-soft);
  font-size: 15px;
  margin-bottom: 18px;
  max-width: 720px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin: 36px 0 18px;
  letter-spacing: -0.01em;
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform .2s, border-color .2s;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 182, 72, 0.3);
}
.card-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--bg);
  border-radius: 10px;
  color: var(--accent);
  flex-shrink: 0;
}
.card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* STACK */
.stack-group {
  margin-bottom: 18px;
}
.stack-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stack span {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

/* TIMELINE */
.timeline-block { margin-bottom: 36px; }
.timeline-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}
.timeline-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--accent);
}
.timeline-head h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.timeline {
  border-left: 1px solid var(--border);
  margin-left: 21px;
  padding-left: 28px;
  display: grid;
  gap: 26px;
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline-item h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.timeline-item .meta {
  display: block;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.timeline-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* PORTFOLIO */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.project-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .2s, border-color .2s;
  display: block;
}
.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 182, 72, 0.4);
}
.project-thumb {
  height: 140px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--bg), var(--panel-2));
  color: var(--accent);
}
.project-card.placeholder .project-thumb { color: var(--text-muted); }
.project-info {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
}
.project-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.project-info span {
  font-size: 12px;
  color: var(--text-muted);
}

/* CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 560px;
  margin-top: 24px;
}
.contact-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  gap: 16px;
  align-items: center;
  transition: transform .2s, border-color .2s;
}
.contact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 182, 72, 0.4);
}
.contact-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--bg);
  border-radius: 10px;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}
.contact-card span {
  font-size: 13px;
  color: var(--text-muted);
}

/* RESPONSIVE */
@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 20px 16px;
    gap: 18px;
  }
  .sidebar { position: static; }
  .content { padding: 28px 22px; }
  .topnav {
    position: static;
    margin-bottom: 24px;
    justify-content: center;
    flex-wrap: wrap;
  }
  .panel-header { padding-top: 0; }
  .cards-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .panel-header h2 { font-size: 26px; }
}
