:root {
  --bg: #0b0e13;
  --panel: #0e131a;
  --card: #121823;
  --text: #e6edf3;
  --muted: #9fb0c3;
  --brand: #7dd3fc;
  --accent: #a78bfa;
  --accent-2: #34d399;
  --shadow: rgba(0,0,0,0.2);
  
  /* Section-specific colors */
  --ml-color: #22c55e;
  --robotics-color: #ffffff;
  --graphics3d-color: #eab308;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: linear-gradient(180deg, rgba(11,14,19,0.9), rgba(11,14,19,0.5), rgba(11,14,19,0));
  backdrop-filter: blur(8px);
  z-index: 1000;
}
.brand { font-weight: 700; letter-spacing: 0.3px; color: var(--brand); }
.site-nav a {
  color: var(--text);
  text-decoration: none;
  margin-left: 16px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 160ms ease;
}
.site-nav a:hover { background: rgba(255,255,255,0.06); }

main { scroll-snap-type: y mandatory; overflow-y: auto; height: 100vh; }
.panel {
  position: relative;
  min-height: 100vh;
  padding: 112px 24px 64px; /* top offset for header */
  display: grid;
  align-items: center;
  background: var(--panel);
  scroll-snap-align: start;
}
.panel:nth-child(odd) { background: #0b1119; }

/* Section-specific colors */
#ml {
  background: linear-gradient(135deg, rgba(34,197,94,0.1), rgba(34,197,94,0.05));
  border-left: 4px solid var(--ml-color);
}

#robotics {
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  border-left: 4px solid var(--robotics-color);
}

#graphics3d {
  background: linear-gradient(135deg, rgba(234,179,8,0.1), rgba(234,179,8,0.05));
  border-left: 4px solid var(--graphics3d-color);
}

#videos {
  background: linear-gradient(135deg, rgba(255,0,0,0.1), rgba(255,0,0,0.05));
  border-left: 4px solid #ff0000;
}

#about {
  background: linear-gradient(135deg, rgba(125,211,252,0.1), rgba(125,211,252,0.05));
  border-left: 4px solid var(--brand);
}

.bg-canvas, .bg-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.content { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; }
.content h1 { font-size: 42px; margin: 0 0 16px; letter-spacing: 0.4px; }

/* Section-specific heading colors */
#ml h1 { color: var(--ml-color); }
#robotics h1 { color: var(--robotics-color); }
#graphics3d h1 { color: var(--graphics3d-color); }
#videos h1 { color: #ff0000; }
#about h1 { color: var(--brand); }
.section-tag { color: var(--muted); font-weight: 600; margin: 24px 0 12px; text-transform: uppercase; letter-spacing: 1.2px; font-size: 12px; }

.cards {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.card {
  grid-column: span 12;
  background: radial-gradient(1200px 300px at 20% -10%, rgba(125,211,252,0.12), transparent),
              radial-gradient(1200px 300px at 80% 110%, rgba(167,139,250,0.10), transparent),
              var(--card);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 20px 40px var(--shadow);
  padding: 20px;
  border-radius: 16px;
}

/* Section-specific card colors */
#ml .card {
  background: radial-gradient(1200px 300px at 20% -10%, rgba(34,197,94,0.15), transparent),
              radial-gradient(1200px 300px at 80% 110%, rgba(34,197,94,0.08), transparent),
              var(--card);
  border: 1px solid rgba(34,197,94,0.2);
}

#robotics .card {
  background: radial-gradient(1200px 300px at 20% -10%, rgba(255,255,255,0.15), transparent),
              radial-gradient(1200px 300px at 80% 110%, rgba(255,255,255,0.08), transparent),
              var(--card);
  border: 1px solid rgba(255,255,255,0.2);
}

#graphics3d .card {
  background: radial-gradient(1200px 300px at 20% -10%, rgba(234,179,8,0.15), transparent),
              radial-gradient(1200px 300px at 80% 110%, rgba(234,179,8,0.08), transparent),
              var(--card);
  border: 1px solid rgba(234,179,8,0.2);
}

#videos .card {
  background: radial-gradient(1200px 300px at 20% -10%, rgba(255,0,0,0.15), transparent),
              radial-gradient(1200px 300px at 80% 110%, rgba(255,0,0,0.08), transparent),
              var(--card);
  border: 1px solid rgba(255,0,0,0.2);
}
.card-media { display: flex; align-items: center; justify-content: center; }
.card-media .media { width: 100%; height: auto; border-radius: 12px; display: block; }

/* Video placeholder styling */
.video-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  border: 2px solid rgba(255,0,0,0.3);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.video-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,0,0,0.1) 50%, transparent 70%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.play-button {
  font-size: 48px;
  color: #ff0000;
  margin-bottom: 12px;
  text-shadow: 0 0 20px rgba(255,0,0,0.5);
  z-index: 1;
}

.video-placeholder p {
  color: #e6edf3;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  z-index: 1;
}

.video-link {
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.2s ease;
}

.video-link:hover {
  transform: scale(1.02);
}

.video-link:hover .play-button {
  color: #ff4444;
  text-shadow: 0 0 30px rgba(255,0,0,0.8);
}

/* About section styling */
.about-hero {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.about-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-img {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--brand);
  box-shadow: 0 20px 40px rgba(125,211,252,0.3);
  transition: transform 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.05);
}

.about-text h1 {
  font-size: 48px;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.about-subtitle {
  font-size: 20px;
  color: var(--muted);
  margin: 0 0 24px;
  font-weight: 500;
}

.about-description {
  font-size: 18px;
  line-height: 1.6;
  color: #d6e2f0;
  margin: 0 0 32px;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.highlight-item {
  background: rgba(125,211,252,0.1);
  border: 1px solid rgba(125,211,252,0.2);
  padding: 16px;
  border-radius: 12px;
  font-size: 14px;
  color: #e6edf3;
}

.highlight-item strong {
  color: var(--brand);
  font-weight: 600;
}

@media (max-width: 768px) {
  .about-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  
  .profile-img {
    width: 250px;
    height: 250px;
  }
  
  .about-text h1 {
    font-size: 36px;
  }
  
  .about-highlights {
    grid-template-columns: 1fr;
  }
}
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 6px 0; color: #d6e2f0; }
.card .meta { color: var(--muted); font-size: 13px; }
.card ul { margin: 10px 0 0 18px; color: #ccdaea; }

@media (min-width: 720px) {
  .card { grid-column: span 6; }
  .card-media { grid-column: span 12; }
}
@media (min-width: 1040px) {
  .card { grid-column: span 4; }
  #education .card-media { grid-column: span 6; }
  #education .card-media + .card { grid-column: span 3; }
  #education .card-media + .card + .card { grid-column: span 3; }
  #professional .card-media { grid-column: span 3; }
  #professional .card-media + .card { grid-column: span 9; }
}

.site-footer { padding: 24px; background: #0b0e13; border-top: 1px solid rgba(255,255,255,0.06); }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.footer-links a { color: var(--muted); text-decoration: none; margin-left: 16px; }

/* Subtle focus style for accessibility */
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

/* Smooth section reveal */
.panel { animation: fadeSlide 500ms ease both; }
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.card-media .video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 10px;
}

.card-media .video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.cards.single-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.card-media .video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.card-media .video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.card h3 {
  margin-top: 0.5rem;
}

.card .meta {
  font-size: 0.9rem;
  color: #666;
  margin: 0.3rem 0;
}

.card .detail {
  font-size: 0.95rem;
  line-height: 1.5;
}


#videos .cards {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
