/* ─────────────────────────────────────────────────────────
   Kabir Potdar · GitHub Pages · main.css
   Aesthetic: Academic editorial — restrained, typographic,
   ink-on-paper with precise structural geometry.
───────────────────────────────────────────────────────── */

:root {
  --ink:        #111111;
  --ink-soft:   #444444;
  --ink-muted:  #888888;
  --paper:      #F7F5F0;
  --paper-alt:  #EEEAE2;
  --rule:       #D4CFC5;
  --accent:     #1A3A5C;   /* deep navy — scholarly */
  --accent-lt:  #2E5F8F;
  --accent-bg:  #EBF1F7;
  --mono-bg:    #E8E5DE;
  --radius:     4px;
  --font-serif: 'EB Garamond', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', 'Courier New', monospace;
  --max-w:      1100px;
  --section-gap: 6rem;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 2rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--font-sans); font-weight: 500; margin-bottom: 0.75rem; color: var(--ink-soft); }
p  { color: var(--ink-soft); line-height: 1.75; margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
em { font-style: italic; color: var(--ink); }
strong { font-weight: 500; color: var(--ink); }

/* ── Utility ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: var(--accent-lt); border-color: var(--accent-lt); }
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-secondary:hover { background: var(--accent-bg); }

/* ── NAV ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}
.nav-logo:hover { background: var(--accent); color: #fff; }
.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink-soft);
  transition: color 0.2s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { width: 100%; }
.nav-toggle { display: none; }

/* ── HERO ── */
.hero {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-bg) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 2rem;
  display: flex;
  align-items: center;
  gap: 3rem;
  width: 100%;
}
.hero-text { flex: 1; }
.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-links-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-right: 1rem;
}
.hero-links-vertical a {
  color: var(--ink-muted);
  transition: color 0.2s, transform 0.2s;
}
.hero-links-vertical a:hover { color: var(--accent); transform: translateX(-2px); }
.side-line {
  width: 1px;
  height: 80px;
  background: var(--rule);
  margin-top: 0.5rem;
}

/* ── SECTIONS ── */
.section { padding: var(--section-gap) 0; }
.section-alt { background: var(--paper-alt); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.section-intro {
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 600px;
  margin-bottom: 3rem;
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
  align-items: start;
}
.about-text h2 { margin-bottom: 1.5rem; }
.about-text p { font-size: 1.05rem; }
.sidebar-block {
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-block ul li {
  font-size: 0.875rem;
  color: var(--ink-soft);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rule);
}
.sidebar-block ul li:last-child { border-bottom: none; }
.sidebar-block ul li::before {
  content: '→ ';
  color: var(--accent);
  font-size: 0.75rem;
}
.edu-item { font-size: 0.875rem; color: var(--ink-soft); margin-bottom: 0; }
.edu-item strong { color: var(--ink); display: block; }
.edu-item span { font-size: 0.8rem; color: var(--ink-muted); }

/* ── PUBLICATIONS ── */
.pub-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  background: var(--paper);
  transition: box-shadow 0.2s;
}
.pub-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
.pub-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.pub-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
}
.pub-badge--preprint { background: var(--mono-bg); color: var(--ink-soft); }
.pub-badge--conference { background: var(--accent-bg); color: var(--accent); }
.pub-badge--workshop { background: #F0EAD6; color: #7A6020; }
.pub-badge--journal { background: #E8F5E9; color: #2E7D32; }
.pub-badge:empty { display: none; }
.pub-year { font-size: 0.8rem; color: var(--ink-muted); font-family: var(--font-mono); }
.pub-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}
.pub-authors { font-size: 0.875rem; color: var(--ink-soft); margin-bottom: 0.25rem; }
.pub-venue { font-size: 0.8rem; color: var(--ink-muted); font-style: italic; margin-bottom: 1rem; }
.pub-abstract { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 1rem; line-height: 1.65; }
.pub-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.pub-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius);
  transition: all 0.2s;
}
.pub-link:hover { background: var(--accent); color: #fff; }
.scholar-link-wrap { margin-top: 2rem; }

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.project-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.project-card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}
.project-icon-links { display: flex; gap: 0.5rem; }
.project-icon-links a { color: var(--ink-muted); transition: color 0.2s; }
.project-icon-links a:hover { color: var(--accent); }
.project-card h3 { font-size: 1.05rem; color: var(--ink); margin-bottom: 0.5rem; }
.project-card p { font-size: 0.875rem; flex: 1; margin-bottom: 1.25rem; }
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}
.project-tech span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--mono-bg);
  color: var(--ink-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}
.project-tech span:empty { display: none; }

/* ── CONTACT ── */
.contact-container { text-align: center; padding-top: var(--section-gap); padding-bottom: var(--section-gap); }
.contact-container h2 { margin-bottom: 1rem; }
.contact-intro { max-width: 520px; margin: 0 auto 2.5rem; font-size: 1.05rem; }
.contact-email {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.1rem;
  margin-bottom: 2.5rem;
  transition: opacity 0.2s;
}
.contact-email:hover { opacity: 0.7; }
.contact-socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.contact-socials a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.contact-socials a:hover { color: var(--accent); }

/* ── EXPERIENCE TIMELINE ── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  align-items: flex-start;
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
  padding-top: 0.25rem;
}
.timeline-content h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.timeline-company {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 1rem;
}
.timeline-content ul {
  list-style: disc;
  padding-left: 1.25rem;
}
.timeline-content li {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* ── CERTIFICATIONS ── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.cert-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}
.cert-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.cert-card h3 {
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.cert-card p {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}
.cert-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* ── ACHIEVEMENTS ── */
.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.achievement-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.achievement-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.achievement-item strong {
  font-size: 1rem;
  display: block;
  margin-bottom: 0.25rem;
}
.achievement-item p {
  font-size: 0.875rem;
  margin: 0;
}

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-name { font-family: var(--font-serif); font-size: 0.95rem; color: var(--ink-soft); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--ink-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 0.78rem; color: var(--ink-muted); font-family: var(--font-mono); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-inner { flex-direction: column; }
  .hero-links-vertical { flex-direction: row; padding-right: 0; }
  .side-line { display: none; }
  .hero-name { font-size: clamp(2.8rem, 12vw, 4rem); }
  .nav-links { display: none; gap: 1.5rem; flex-direction: column; }
  .nav-links.is-open {
    display: flex;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--paper);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--rule);
  }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
  }
  .nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--ink);
    transition: all 0.2s;
  }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .projects-grid { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .cert-grid { grid-template-columns: 1fr; }
}

/* ── Fade-in on scroll ── */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}
