:root {
  --bg: #0f0a1f;
  --surface: #130f26;
  --text: #e9e6f8;
  --muted: #c8c2e6;
  --primary: #7c3aed; /* Purple */
  --primary-600: #5b21b6;
  --ring: rgba(167, 139, 250, 0.35);
  --border: rgba(167, 139, 250, 0.22);
  --sidebar-width: 260px;
  --sidebar-gap: 24px;
}

* {
  box-sizing: border-box;
}

html, body {
  padding: 0;
  margin: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  color: var(--text);
  background: radial-gradient(1200px 800px at 90% -10%, #4c1d95 0%, transparent 60%),
              radial-gradient(1200px 800px at -10% 10%, #7c3aed 0%, transparent 60%),
              linear-gradient(180deg, #0b0718 0%, var(--bg) 60%);
  line-height: 1.6;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

/* Layout with fixed sidebar */
.layout {
  width: min(1200px, 96%);
  margin: 0 auto;
  padding-left: calc(var(--sidebar-width) + var(--sidebar-gap));
}
.content { min-width: 0; }

.sidebar {
  position: fixed;
  left: 16px;
  top: 16px;
  width: var(--sidebar-width);
  height: calc(100vh - 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(19, 15, 38, 0.8);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: white;
  font-weight: 800;
}

.brand-text {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav-list {
  list-style: none;
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}

.nav-list a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  display: block;
}

.nav-list a:hover {
  color: var(--text);
}

.nav-list a.active {
  background: rgba(124, 58, 237, 0.15);
  color: var(--text);
  border: 1px solid var(--border);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 0.25rem;
}

.nav-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
}

.nav-toggle .bar + .bar {
  margin-top: 5px;
}

/* Hero */
.hero {
  padding: 5rem 0 3rem 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: center;
  text-align: left;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  margin: 0.5rem 0 0.75rem 0;
}

.accent {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 1.25rem 0;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}

/* Hero media removed */

/* Sections */
.section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 1.75rem;
  margin: 0 0 1rem 0;
}

.section-text {
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  box-shadow: 0 8px 20px -10px var(--ring);
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--primary);
}

.btn-sm { padding: 0.45rem 0.7rem; border-radius: 8px; font-size: 0.9rem; }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}

.skill {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 700;
}

/* Cards */
.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
  transition: transform 260ms cubic-bezier(.2,.7,.2,1), box-shadow 260ms ease;
  transform: translateZ(0);
  perspective: 900px;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 44px rgba(0,0,0,0.35);
}

.card-inner {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 120ms ease;
}

.card-body {
  padding: 1.25rem;
}

.project-image {
  margin-top: 0.75rem;
  border-radius: 12px;
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
  transition: transform 220ms ease;
}

.card:hover .project-image { transform: translateY(-3px) scale(1.02); }

.card-title {
  margin: 0 0 0.5rem 0;
}

.card-meta {
  margin: 0;
  color: var(--primary);
  font-weight: 600;
}

.card-text {
  color: var(--muted);
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0.5rem 0;
}

.tag {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
}

/* Enter animation */
.fade-up {
  animation: fadeUp 600ms ease both;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Timeline */
.timeline {
  position: relative;
  margin-left: 1rem;
  padding-left: 1.25rem;
}

.timeline:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--primary-600));
  opacity: 0.25;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.25rem;
}

.timeline-dot {
  position: absolute;
  left: -10px;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.08);
}

.timeline-title {
  margin: 0 0 0.25rem 0;
}

.timeline-subtitle {
  margin: 0 0 0.25rem 0;
  color: var(--muted);
  font-weight: 600;
}

.timeline-text {
  margin: 0;
  color: var(--muted);
}

/* Badges */
.badge-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
}

.badge {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
}

.contact-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.contact-list li + li { margin-top: 0.35rem; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
}

.form-field {
  display: grid;
  gap: 0.35rem;
}

.form-field + .form-field {
  margin-top: 0.75rem;
}

label { font-weight: 600; }

input, textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #100c22;
  color: var(--text);
  outline: none;
  font: inherit;
}

input:focus, textarea:focus {
  box-shadow: 0 0 0 4px var(--ring);
  border-color: var(--primary);
}

.form-hint {
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  color: var(--muted);
  background: rgba(12, 8, 24, 0.5);
}

.footer-inner { text-align: center; }

/* Responsive */
@media (max-width: 900px) {
  .layout { padding-left: 0; width: 92%; }
  .sidebar { position: static; width: auto; height: auto; left: auto; top: auto; }
  .content { width: 100%; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-subtitle { margin: 0 auto 1.25rem auto; }
  .hero-cta { justify-content: center; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav-list {
    position: absolute;
    right: 4%;
    top: 60px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
  }
  .nav-list.open { display: flex; }
}

