/* --- VARIABLES & RESET --- */
:root {
  --bg-color: #0f172a;
  --card-bg: #1e293b;
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.15);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --sidebar-width: 300px;
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

/* --- LAYOUT --- */
.page { display: flex; min-height: 100vh; }

/* --- SIDEBAR --- */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(30, 41, 59, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  position: fixed;
  height: 100vh;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 10;
  animation: slideInLeft 1s ease-out forwards;
}

.sidebar__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* --- AVATAR (CENTERED FIX) --- */
.brand__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.5rem auto; /* This centers it horizontally */
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.brand__avatar:hover { border-color: var(--accent); }
.brand__avatar img { width: 100%; height: 100%; object-fit: cover; }

.brand__name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.brand__tag {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 2rem;
}

/* --- NAVIGATION --- */
.nav { width: 100%; margin-top: 1rem; }
.nav__link {
  display: block;
  padding: 0.6rem 0.5rem;
  margin-bottom: 0.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 6px;
  transition: var(--transition);
}
.nav__link:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.03);
  transform: translateX(5px);
}

/* --- SOCIAL ICONS --- */
.sidebar__footer { margin-top: auto; text-align: center; }
.social-icons { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }
.social-link {
  font-size: 1.25rem;
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  transition: var(--transition);
}
.social-link:hover {
  background: var(--accent);
  color: #0f172a;
  transform: translateY(-2px);
}
.muted { font-size: 0.75rem; color: rgba(255,255,255,0.2); }

/* --- MAIN CONTENT --- */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 5rem 4rem;
  max-width: 1200px;
  opacity: 0;
  animation: slideInRight 1s ease-out 0.2s forwards;
}

.panel { margin-bottom: 6rem; }
.title { font-size: 3rem; font-weight: 800; margin-bottom: 1rem; letter-spacing: -0.03em; color: var(--text-main); }
.subtitle { font-size: 1.15rem; color: var(--text-muted); max-width: 650px; font-weight: 300; }
.sectionHeader { display: flex; align-items: center; margin-bottom: 2.5rem; }
.h2 { font-size: 1.75rem; margin-right: 1.5rem; color: var(--text-main); font-weight: 700; }
.rule { flex: 1; height: 1px; background: rgba(255, 255, 255, 0.1); }

/* --- PROJECTS GRID --- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.card__media { width: 100%; height: 180px; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .card__media img { transform: scale(1.05); }

.card__body { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }
.card__title { font-size: 1.15rem; margin-bottom: 0.75rem; color: var(--text-main); font-weight: 600; }
.card__text { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.7; flex-grow: 1; }

/* --- BUTTONS & ACTIONS --- */
.card__actions {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent);
  border-radius: 4px;
  font-weight: 500;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background: transparent;
  flex: 1;
}
.btn:hover { background: rgba(56, 189, 248, 0.1); border-color: var(--accent); color: #fff; }

/* --- MODAL (POP UP) --- */
.modal {
  display: none;
  position: fixed; 
  z-index: 1000; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  background-color: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  position: relative;
  margin: 5% auto;
  padding: 0;
  width: 80%;
  max-width: 900px;
  background: transparent;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease-out;
}

.modal-content video {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.close {
  position: absolute;
  top: -40px;
  right: 0;
  color: #fff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
.close:hover { color: var(--accent); }

@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }
@keyframes zoomIn { from {transform: scale(0.9);} to {transform: scale(1);} }

/* --- KEYFRAMES --- */
@keyframes slideInLeft { 0% { opacity: 0; transform: translateX(-50px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { 0% { opacity: 0; transform: translateX(50px); } 100% { opacity: 1; transform: translateX(0); } }

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
  .page { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: relative; border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    animation: slideInLeft 0.8s ease-out forwards;
  }
  .main { margin-left: 0; padding: 3rem 1.5rem; }
  .title { font-size: 2.25rem; }
}