/* ═══════════════════════════════════════════
   PRIYAM — SHARED TERMINAL STYLESHEET
   ═══════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
}

body {
  background: #000000;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* ── NAVBAR ── */
nav {
  margin-bottom: 56px;
}

nav a {
  color: #9a9a9a;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

nav a:hover,
nav a.active {
  color: #ffffff;
}

nav .sep {
  color: #333333;
  margin: 0 8px;
  font-size: 12px;
}

/* ── ASCII ART ── */
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.page-header-text {
  flex: 1;
  min-width: 0;
}

.ascii-art {
  font-size: 11px;
  line-height: 1.25;
  color: #333333;
  white-space: pre;
  user-select: none;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

/* ── PAGE TITLE (used on sub-pages) ── */
.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.page-desc {
  font-size: 13px;
  color: #9a9a9a;
  line-height: 1.7;
  margin-bottom: 0;
  max-width: 600px;
}

/* ── HEADER (home page) ── */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.home-header > div {
  flex: 1;
  min-width: 0;
}

.home-icon {
  width: 74px;
  height: 74px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.home-icon:hover {
  opacity: 1;
}

.header-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.header-subtitle {
  font-size: 13px;
  color: #9a9a9a;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.header-by {
  font-size: 13px;
  color: #666666;
  margin-bottom: 8px;
}

.header-links a {
  color: #9a9a9a;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 13px;
  transition: color 0.2s;
}

.header-links a:hover {
  color: #ffffff;
}

.header-links .sep {
  color: #333333;
  margin: 0 6px;
  font-size: 13px;
}

.mission {
  margin-top: 24px;
  color: #cccccc;
  font-size: 13px;
  line-height: 1.8;
  max-width: 600px;
}

/* ── HORIZONTAL RULES ── */
hr {
  border: none;
  border-top: 1px solid #222222;
  margin: 48px 0;
}

/* ── SECTION HEADERS ── */
.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 24px;
  color: #ffffff;
}

/* ── DOTTED LEADER ROWS ── */
.row {
  display: flex;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 13px;
}

.row-label {
  color: #9a9a9a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  min-width: 160px;
}

.row-dots {
  flex: 1;
  overflow: hidden;
  color: #333333;
  margin: 0 8px;
  letter-spacing: 2px;
  white-space: nowrap;
}

.row-dots::after {
  content: ' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .';
}

.row-value {
  color: #ffffff;
  white-space: nowrap;
  text-align: right;
}

.row-value a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.row-value a:hover {
  color: #9a9a9a;
}

/* ── LIST ITEMS ── */
.list-item {
  font-size: 13px;
  color: #cccccc;
  margin-bottom: 8px;
  padding-left: 16px;
  position: relative;
}

.list-item::before {
  content: '-';
  position: absolute;
  left: 0;
  color: #555555;
}

.list-item-name {
  color: #ffffff;
}

.list-item-desc {
  color: #9a9a9a;
}

.list-tail {
  font-size: 13px;
  color: #555555;
  margin-top: 16px;
  padding-left: 16px;
}

/* ── PROJECT CARDS (expanded view for projects page) ── */
.project {
  margin-bottom: 40px;
}

.project-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.project-desc {
  font-size: 13px;
  color: #9a9a9a;
  line-height: 1.7;
  margin-bottom: 10px;
  max-width: 600px;
}

.project-meta {
  font-size: 12px;
  color: #555555;
  margin-bottom: 6px;
}

.project-meta span {
  color: #9a9a9a;
}

.project-links a {
  font-size: 12px;
  color: #9a9a9a;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
  margin-right: 16px;
}

.project-links a:hover {
  color: #ffffff;
}

/* ── EXPERIENCE BLOCKS ── */
.exp-block {
  margin-bottom: 40px;
}

.exp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.exp-header > div {
  flex: 1;
  min-width: 0;
}

.exp-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.5;
  filter: grayscale(100%);
  transition: opacity 0.2s, filter 0.2s;
  margin-top: 2px;
}

.exp-logo:hover {
  opacity: 0.85;
  filter: grayscale(0%);
}

.exp-role {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.exp-org {
  font-size: 13px;
  color: #9a9a9a;
  margin-bottom: 4px;
}

.exp-period {
  font-size: 12px;
  color: #555555;
  margin-bottom: 10px;
}

.exp-details {
  font-size: 13px;
  color: #cccccc;
  line-height: 1.7;
}

.exp-details .list-item {
  margin-bottom: 4px;
}

/* ── GALLERY / IMAGE PLACEHOLDERS ── */
.gallery {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.gallery img {
  max-width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%) brightness(0.8);
  transition: filter 0.3s;
}

.gallery img:hover {
  filter: grayscale(0%) brightness(1);
}

/* ── RESEARCH PAPERS ── */
.paper {
  margin-bottom: 36px;
}

.paper-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.paper-title a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.paper-title a:hover {
  color: #9a9a9a;
}

.paper-authors {
  font-size: 12px;
  color: #9a9a9a;
  margin-bottom: 4px;
}

.paper-venue {
  font-size: 12px;
  color: #555555;
  margin-bottom: 8px;
}

.paper-abstract {
  font-size: 13px;
  color: #666666;
  line-height: 1.7;
  max-width: 600px;
}

.paper-links a {
  font-size: 12px;
  color: #9a9a9a;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-right: 16px;
  transition: color 0.2s;
}

.paper-links a:hover {
  color: #ffffff;
}

/* ── BLOG POSTS ── */
.post {
  margin-bottom: 36px;
}

.post-date {
  font-size: 12px;
  color: #555555;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.post-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.post-title a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.post-title a:hover {
  color: #9a9a9a;
}

.post-excerpt {
  font-size: 13px;
  color: #9a9a9a;
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 8px;
}

.post-tags {
  font-size: 11px;
  color: #555555;
  display: flex;
  gap: 12px;
}

.post-tags span::before {
  content: '#';
  color: #333333;
}

/* ── BACK LINK ── */
.back-link {
  display: inline-block;
  font-size: 12px;
  color: #555555;
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
  margin-bottom: 32px;
}

.back-link:hover {
  color: #9a9a9a;
}

/* ═══════════════════════════════════════════
   BLOG ARTICLE — MEDIUM-STYLE
   ═══════════════════════════════════════════ */
.blog-article {
  max-width: 680px;
  margin: 0 auto;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 12px;
  color: #666666;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-reading-time::before {
  content: '·';
  margin-right: 16px;
  color: #333333;
}

.article-title {
  font-family: 'Lora', 'Georgia', serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.article-tags span {
  font-size: 11px;
  color: #888888;
  background: #111111;
  border: 1px solid #222222;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

.article-divider {
  width: 100%;
  height: 1px;
  background: #222222;
  margin: 36px 0;
}

/* ── Article Body ── */
.article-body {
  font-family: 'Lora', 'Georgia', serif;
  font-size: 17px;
  line-height: 1.85;
  color: #d4d4d4;
}

.article-body p {
  margin-bottom: 24px;
}

.article-body strong {
  color: #ffffff;
  font-weight: 600;
}

.article-body a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #444444;
  transition: text-decoration-color 0.2s;
}

.article-body a:hover {
  text-decoration-color: #ffffff;
}

.article-body blockquote {
  border-left: 3px solid #333333;
  margin: 36px 0;
  padding: 4px 0 4px 24px;
  font-style: italic;
  color: #aaaaaa;
  font-size: 18px;
  line-height: 1.8;
}

/* ── Figures ── */
.article-figure {
  margin: 40px 0;
  text-align: center;
}

.article-figure img {
  max-width: 480px;
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid #1a1a1a;
  display: block;
  margin: 0 auto;
  background: #0a0a0a;
  padding: 8px;
}

.article-figure figcaption {
  font-family: 'Inter', 'JetBrains Mono', sans-serif;
  font-size: 12px;
  color: #666666;
  margin-top: 12px;
  line-height: 1.6;
  font-style: italic;
}

/* ── Equation Block ── */
.article-equation {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  color: #ffffff;
  text-align: center;
  margin: 32px 0;
  padding: 20px 24px;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

/* ── Notion-style Code Block ── */
.article-code-block {
  margin: 28px 0;
  border-radius: 6px;
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  overflow: hidden;
}

.article-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #141414;
  border-bottom: 1px solid #1e1e1e;
}

.article-code-lang {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-code-copy {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #555;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.article-code-copy:hover {
  color: #aaa;
  background: #1a1a1a;
}

.article-code-copy.copied {
  color: #4ade80;
}

.article-code-block pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
}

.article-code-block code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  color: #c8c8c8;
  line-height: 1.75;
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
}

/* syntax highlights */
.article-code-block .kw  { color: #c586c0; }  /* keywords */
.article-code-block .type { color: #4ec9b0; } /* types */
.article-code-block .fn  { color: #dcdcaa; }  /* functions */
.article-code-block .str { color: #ce9178; }  /* strings */
.article-code-block .cmt { color: #6a9955; font-style: italic; } /* comments */
.article-code-block .num { color: #b5cea8; }  /* numbers */

.article-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  color: #e0e0e0;
  background: #141414;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #1e1e1e;
}

/* ── Highlight Block ── */
.article-highlight {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin: 44px 0;
  padding: 28px 24px;
  background: linear-gradient(135deg, #0a0a0a 0%, #111111 100%);
  border: 1px solid #222222;
  border-radius: 8px;
  letter-spacing: 0.06em;
  line-height: 1.7;
}

/* ── Section Break ── */
.article-section-break {
  text-align: center;
  color: #333333;
  font-size: 18px;
  letter-spacing: 8px;
  margin: 40px 0;
}

/* ── Article Footer ── */
.article-footer-note {
  font-size: 13px;
  color: #555555;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

/* ── FOOTER ── */
.footer {
  margin-top: 0;
  font-size: 12px;
  color: #555555;
}

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

.footer-links a {
  color: #555555;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #9a9a9a;
}

.footer-links .sep {
  color: #333333;
  margin: 0 4px;
  font-size: 12px;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 768px)
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .container {
    padding: 40px 20px 56px;
  }

  .header-name {
    font-size: 24px;
    letter-spacing: 0.14em;
  }

  .page-title {
    font-size: 20px;
  }

  .page-header-row {
    gap: 20px;
  }

  .ascii-art {
    font-size: 9px;
  }

  hr {
    margin: 36px 0;
  }

  .project-desc,
  .paper-abstract,
  .post-excerpt,
  .mission {
    max-width: 100%;
  }

  nav .sep {
    margin: 0 5px;
  }

  .article-title {
    font-size: 28px;
  }

  .article-body {
    font-size: 16px;
  }

  .article-highlight {
    font-size: 14px;
    padding: 24px 20px;
  }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 540px)
   ═══════════════════════════════════════════ */
@media (max-width: 540px) {
  .container {
    padding: 28px 16px 44px;
  }

  /* ── NAV: wrap gracefully ── */
  nav {
    margin-bottom: 36px;
    line-height: 2;
  }

  nav a {
    font-size: 11px;
  }

  nav .sep {
    margin: 0 4px;
  }

  /* ── HEADER ── */
  .home-icon {
    width: 53px;
    height: 53px;
  }

  .header-name {
    font-size: 20px;
    letter-spacing: 0.12em;
  }

  .header-subtitle {
    font-size: 11px;
    margin-bottom: 16px;
  }

  .header-links a {
    font-size: 12px;
  }

  .header-links .sep {
    margin: 0 4px;
  }

  .mission {
    font-size: 12px;
    line-height: 1.75;
    max-width: 100%;
  }

  /* ── PAGE HEADERS ── */
  .page-title {
    font-size: 18px;
    letter-spacing: 0.1em;
  }

  .page-desc {
    font-size: 12px;
  }

  .page-header-row {
    flex-direction: column;
    gap: 0;
  }

  .ascii-art {
    display: none;
  }

  /* ── SECTIONS ── */
  .section-title {
    font-size: 12px;
    margin-bottom: 18px;
  }

  hr {
    margin: 32px 0;
  }

  /* ── ROWS: stack label/value vertically ── */
  .row {
    flex-wrap: wrap;
    margin-bottom: 12px;
  }

  .row-label {
    min-width: unset;
    width: 100%;
    margin-bottom: 2px;
    font-size: 11px;
  }

  .row-dots {
    display: none;
  }

  .row-value {
    text-align: left;
    padding-left: 0;
    font-size: 13px;
    white-space: normal;
    word-break: break-word;
  }

  /* ── PROJECTS ── */
  .project {
    margin-bottom: 32px;
  }

  .project-name {
    font-size: 13px;
    line-height: 1.5;
  }

  .project-desc {
    font-size: 12px;
    max-width: 100%;
  }

  .project-meta {
    font-size: 11px;
  }

  .project-links a {
    font-size: 11px;
    margin-right: 12px;
  }

  /* ── EXPERIENCE ── */
  .exp-block {
    margin-bottom: 32px;
  }

  .exp-logo {
    width: 28px;
    height: 28px;
  }

  .exp-role {
    font-size: 13px;
    line-height: 1.5;
  }

  .exp-org {
    font-size: 12px;
  }

  .exp-period {
    font-size: 11px;
  }

  .exp-details {
    font-size: 12px;
  }

  .exp-details .list-item {
    margin-bottom: 6px;
  }

  /* ── PAPERS / NOTES ── */
  .paper {
    margin-bottom: 28px;
  }

  .paper-title {
    font-size: 13px;
    line-height: 1.5;
  }

  .paper-authors {
    font-size: 11px;
  }

  .paper-venue {
    font-size: 11px;
  }

  .paper-abstract {
    font-size: 12px;
    max-width: 100%;
    line-height: 1.65;
  }

  .paper-links a {
    font-size: 11px;
  }

  /* ── BLOG ── */
  .post {
    margin-bottom: 28px;
  }

  .post-title {
    font-size: 13px;
  }

  .post-excerpt {
    font-size: 12px;
    max-width: 100%;
  }

  .post-tags {
    font-size: 10px;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* ── BLOG ARTICLE ── */
  .article-title {
    font-size: 24px;
    line-height: 1.35;
  }

  .article-body {
    font-size: 15px;
    line-height: 1.8;
  }

  .article-body blockquote {
    font-size: 16px;
    padding-left: 18px;
    margin: 28px 0;
  }

  .article-equation {
    font-size: 15px;
    padding: 16px 18px;
  }

  .article-highlight {
    font-size: 13px;
    padding: 20px 16px;
    letter-spacing: 0.03em;
  }

  .article-tags span {
    font-size: 10px;
    padding: 3px 10px;
  }

  .article-meta {
    font-size: 11px;
  }

  .article-figure {
    margin: 28px 0;
  }

  .article-figure img {
    max-width: 100%;
    padding: 6px;
  }

  /* ── LIST ITEMS ── */
  .list-item {
    font-size: 12px;
    line-height: 1.65;
    margin-bottom: 10px;
  }

  /* ── GALLERY ── */
  .gallery {
    flex-direction: column;
    gap: 8px;
  }

  /* ── FOOTER ── */
  .footer {
    font-size: 11px;
  }

  .footer-links a {
    font-size: 11px;
  }

  .footer-links .sep {
    margin: 0 3px;
  }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (≤ 380px)
   ═══════════════════════════════════════════ */
@media (max-width: 380px) {
  .container {
    padding: 24px 12px 36px;
  }

  .header-name {
    font-size: 18px;
    letter-spacing: 0.1em;
  }

  .page-title {
    font-size: 16px;
  }

  nav {
    margin-bottom: 28px;
  }

  nav a {
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  nav .sep {
    margin: 0 3px;
  }

  .row {
    margin-bottom: 14px;
  }

  .row-label {
    font-size: 10px;
  }

  .row-value {
    font-size: 12px;
  }

  .project-name,
  .exp-role,
  .paper-title,
  .post-title {
    font-size: 12px;
  }

  .project-desc,
  .paper-abstract,
  .post-excerpt,
  .exp-details,
  .list-item {
    font-size: 11px;
  }
}

/* ═══════════════════════════════════════════
   TOUCH TARGET — ensure tap-friendly links
   ═══════════════════════════════════════════ */
@media (pointer: coarse) {
  nav a {
    padding: 6px 2px;
  }

  .row-value a,
  .project-links a,
  .paper-links a,
  .paper-title a,
  .post-title a,
  .header-links a,
  .footer-links a {
    padding: 4px 0;
    display: inline-block;
  }
}
