@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap');

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0a0e14;
  --bg-surface:  #0d1117;
  --bg-card:     #111820;
  --green:       #00ff88;
  --green-dim:   #00cc6a;
  --green-muted: #1a3a2a;
  --blue:        #58a6ff;
  --blue-dim:    #388bfd;
  --cyan:        #39d2c0;
  --text:        #c9d1d9;
  --text-dim:    #8b949e;
  --text-bright: #e6edf3;
  --border:      #21262d;
  --red:         #ff5f56;
  --yellow:      #ffbd2e;
  --green-dot:   #27c93f;
  --grid-color:  rgba(48, 54, 61, 0.3);
  --font-mono:   'Fira Code', 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  /* faint grid */
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
  min-height: 100vh;
}

::selection {
  background: var(--green);
  color: var(--bg);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── NAVBAR (pinned top) ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}

.navbar-prompt {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(139, 148, 158, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar-prompt .user { color: rgba(0, 255, 136, 0.35); }
.navbar-prompt .sep  { color: rgba(88, 166, 255, 0.3); }
.navbar-prompt .path { color: rgba(88, 166, 255, 0.3); }

.navbar-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.navbar-links a {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 4px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.navbar-links a:hover {
  color: var(--green);
  border-color: var(--green-muted);
  background: rgba(0, 255, 136, 0.05);
}

/* ── LAYOUT ── */
.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 72px 24px 40px;
}

.page-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.page-layout.three-col {
  justify-content: center;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.sidebar-left {
  width: 250px;
  flex-shrink: 0;
  position: sticky;
  top: 68px;
}

.sidebar-right {
  width: 350px;
  flex-shrink: 0;
  position: sticky;
  top: 68px;
}

/* Weekend Builds duplicate shown only on mobile (before Experience) */
.weekend-mobile { display: none; }

.sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 68px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── TERMINAL WINDOW ── */
.terminal {
  background: var(--bg-surface);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 28px;
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(17, 24, 32, 0.8);
  border-bottom: 1px solid rgba(0, 255, 136, 0.1);
  gap: 12px;
}

.terminal-dots {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.terminal-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}

.dot-red    { background: rgba(255, 95, 86, 0.8); }
.dot-yellow { background: rgba(255, 189, 46, 0.8); }
.dot-green  { background: rgba(39, 201, 63, 0.8); }

.terminal-title {
  font-size: 12px;
  color: rgba(139, 148, 158, 0.3);
  text-align: center;
  flex: 1;
  letter-spacing: 0.5px;
}

.terminal-body {
  padding: 24px;
}

/* ── PROMPT LINE ── */
.prompt {
  font-family: var(--font-mono);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.8;
}

.prompt .user { color: rgba(0, 255, 136, 0.3); font-weight: 600; }
.prompt .sep  { color: rgba(139, 148, 158, 0.25); }
.prompt .path { color: rgba(88, 166, 255, 0.3); font-weight: 500; }
.prompt .cmd  { color: rgba(230, 237, 243, 0.25); }

/* ── BLINKING CURSOR ── */
.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: rgba(0, 255, 136, 0.35);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ── HEADER / HERO ── */
.hero-grid {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.hero-text {
  flex: 1;
}

.hero-name {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero-text p {
  margin-bottom: 12px;
  color: var(--text);
}

.hero-links {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-links a {
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.2s;
}

.hero-links a:hover {
  border-color: var(--blue);
  background: rgba(88, 166, 255, 0.08);
  color: var(--text-bright);
}

.hero-portrait {
  flex-shrink: 0;
}

.hero-portrait img {
  width: 170px;
  border-radius: 8px;
  border: 2px solid var(--border);
  filter: grayscale(20%) contrast(1.05);
  transition: filter 0.3s, border-color 0.3s, transform 0.3s;
  cursor: pointer;
}

.hero-portrait img:hover {
  filter: grayscale(0%) contrast(1.1);
  border-color: var(--green-muted);
  transform: scale(1.8);
  z-index: 100;
  position: relative;
}

/* ── SECTION HEADINGS ── */
.section-heading {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading::before {
  content: '#';
  color: rgba(139, 148, 158, 0.25);
}

.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── PROJECT / ITEM CARDS ── */
.item {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.item:last-child {
  border-bottom: none;
}

.item-image-wrap {
  flex-shrink: 0;
  width: 180px;
}

.item-cite {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
  text-align: center;
}

.item-image {
  flex-shrink: 0;
  width: 180px;
  height: 130px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: border-color 0.3s;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  border: none;
  transition: transform 0.3s;
}

.item-image:hover {
  border-color: var(--green-muted);
}

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

.item-content {
  flex: 1;
  min-width: 0;
}

.item-title {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 4px;
}

.item-meta {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.item-meta b {
  color: var(--text);
}

.item-content p {
  font-size: 15px;
  color: var(--text);
  margin-top: 6px;
}

.item-links {
  margin-top: 8px;
}

.item-links a {
  font-size: 14px;
  color: var(--blue);
  text-decoration: none;
  margin-right: 12px;
  transition: color 0.2s;
}

.item-links a:hover {
  color: var(--green);
}

/* ── EXPERIENCE TABLE ── */
.exp-row {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.exp-row:last-child { border-bottom: none; }

.exp-date {
  color: var(--text-dim);
  flex-shrink: 0;
  width: 160px;
  font-size: 14px;
}

.exp-detail {
  flex: 1;
  color: var(--text);
}

.exp-detail b {
  color: var(--blue);
}

.exp-detail i {
  color: var(--text-dim);
}

/* ── BLOG ENTRIES ── */
.blog-row {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.blog-row:last-child { border-bottom: none; }

.blog-date {
  color: var(--text-dim);
  flex-shrink: 0;
  width: 130px;
  font-size: 12px;
}

.blog-detail a {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.blog-detail a:hover {
  color: var(--blue);
}

.blog-detail p {
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 12px;
}

/* ── FOOTER ── */
.footer {
  text-align: center;
  padding: 24px 0 8px;
  font-size: 11px;
  color: var(--text-dim);
}

.footer a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--green);
}

/* ── COMMENT STYLE OUTPUT LINES ── */
.output-comment {
  color: var(--text-dim);
  font-size: 13px;
  font-style: italic;
}

.output-comment::before {
  content: '// ';
  color: rgba(26, 58, 42, 0.5);
}

/* ── CLICKABLE CARD LINKS (blogs / publications listing) ── */
a.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

a.card-link:hover {
  color: inherit;
}

a.card-link .card-hover {
  border-radius: 8px;
  padding: 16px;
  margin: 0 -16px;
  transition: background 0.2s, border-color 0.3s;
  border: 1px solid transparent;
}

a.card-link:hover .card-hover {
  background: rgba(0, 255, 136, 0.03);
  border-color: var(--green-muted);
}

a.card-link:hover .item-title {
  color: var(--blue);
}

/* ── LINKS (global) ── */
a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green); }

/* ── MOBILE ── */
@media (max-width: 700px) {
  .navbar-prompt { display: none; }
  .navbar-inner { justify-content: center; height: auto; padding: 8px 12px; }
  .navbar-links { justify-content: center; gap: 4px; }
  .navbar-links a { font-size: 13px; padding: 4px 8px; }

  .container { padding: 64px 12px 24px; }

  .terminal-body { padding: 16px; }

  .hero-grid {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
  }

  .hero-portrait img { width: 140px; }
  .hero-links { justify-content: center; }
  .hero-name { font-size: 22px; }

  .item {
    flex-direction: column;
    gap: 12px;
  }

  .item-image {
    width: 100%;
    max-width: 260px;
    height: 160px;
  }

  .exp-row, .blog-row {
    flex-direction: column;
    gap: 2px;
  }

  .exp-date, .blog-date {
    width: auto;
  }

  .page-layout {
    flex-direction: column;
  }

  .sidebar-left,
  .sidebar-right {
    width: 100%;
    position: static;
    order: 2;
  }

  .main-content {
    order: 1;
  }

  /* On mobile, show the inline Weekend Builds (before Experience) and hide the right-column copy */
  .weekend-mobile { display: block; width: 100%; margin-bottom: 28px; }
  .sidebar-right { display: none; }

  .sidebar {
    width: 100%;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar .col-panel {
    flex: 1;
    min-width: 250px;
  }

  .detail-page {
    padding: 64px 12px 24px;
  }
}

/* ── SIDEBAR PANELS: NEWS + WEEKEND BUILDS ── */

.col-panel {
  background: var(--bg-surface);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: 10px;
  padding: 20px;
}

.col-heading {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.col-item {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 4px;
}

.col-item:last-child {
  border-bottom: none;
}

.col-item:hover {
  background: rgba(0, 255, 136, 0.04);
  color: inherit;
}

.col-item:hover .col-label {
  color: var(--green);
}

.col-date {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.col-label {
  font-size: 14px;
  color: var(--text);
  transition: color 0.2s;
  line-height: 1.5;
}

/* ── WEEKEND BUILD SIDEBAR THUMBNAIL ── */
.col-item-weekend {
  display: flex;
  flex-direction: column;
}

.col-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: border-color 0.3s;
}

.col-item-weekend:hover .col-thumb {
  border-color: var(--green-muted);
}

/* ── DETAIL PAGE HERO IMAGE / VIDEO ── */
.detail-hero-img {
  margin-bottom: 24px;
}

.detail-hero-img img,
.detail-hero-img video {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* ── DETAIL PAGE (news / weekend builds) ── */
.detail-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 72px 24px 40px;
}

.detail-back {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
  display: inline-block;
  margin-bottom: 24px;
}

.detail-back:hover {
  color: var(--green);
}

.detail-title {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 8px;
}

.detail-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 28px;
}

.detail-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
}

.detail-body p {
  margin-bottom: 16px;
}

.detail-body a {
  color: var(--blue);
}

.detail-body a:hover {
  color: var(--green);
}

/* ── SUBTLE GLOW ON TERMINAL HOVER ── */
.terminal:hover {
  border-color: rgba(0, 255, 136, 0.15);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.03);
  transition: border-color 0.4s, box-shadow 0.4s;
}
