/* ============================================
   Personal Academic Portfolio — Style Sheet
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg:          #fafbfc;
  --bg-card:     #ffffff;
  --text:        #1a1a2e;
  --text-muted:  #555e68;
  --accent:      #0f4c75;
  --accent-light:#3282b8;
  --border:      #d0d7de;
  --border-light:#e8ecf0;
  --code-bg:     #f0f2f5;
  --tag-bg:      #e8f0fe;
  --tag-text:    #0f4c75;
  --radius:      6px;
  --max-width:   960px;
  --font-body:   'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono:   'IBM Plex Mono', 'Fira Code', 'Consolas', monospace;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--accent-light); }

img { max-width: 100%; display: block; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; }

.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 3rem 0;
}

section + section {
  border-top: 1px solid var(--border-light);
}

/* --- Navigation --- */
.site-nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-nav .logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.5px;
}
.site-nav .logo span { color: var(--accent); }

.nav-links { display: flex; gap: 1.75rem; list-style: none; }

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

/* --- Hero --- */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: none;
}

.hero-content {
  max-width: 640px;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-mono);
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  background: var(--tag-bg);
}

/* --- Cards / Project Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--accent-light);
  box-shadow: 0 2px 12px rgba(15, 76, 117, 0.08);
}

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

.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  color: var(--accent);
}

/* --- About / Info Sections --- */
.info-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0.75rem 2rem;
  font-size: 0.95rem;
}

.info-grid dt {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-grid dd {
  margin: 0;
}

/* --- Skills --- */
.skills-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.skill-group h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}

.skill-group ul {
  list-style: none;
}

.skill-group li {
  font-size: 0.92rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border-light);
}

.skill-group li:last-child { border-bottom: none; }

/* --- Timeline --- */
.timeline { list-style: none; }

.timeline-item {
  position: relative;
  padding-left: 1.5rem;
  padding-bottom: 2rem;
  border-left: 2px solid var(--border);
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline-item h3 {
  font-size: 1rem;
  margin: 0.25rem 0 0.15rem;
}

.timeline-item p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* --- Contact --- */
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.contact-icon {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  min-width: 70px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer .mono {
  font-size: 0.8rem;
}

/* --- Section Header --- */
.section-header {
  margin-bottom: 2rem;
}

.section-header p {
  color: var(--text-muted);
  max-width: 600px;
}

/* --- Page Header (for inner pages) --- */
.page-header {
  padding: 3rem 0 1rem;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-muted);
  max-width: 600px;
}

/* --- Status Badges (project cards) --- */
.status-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.6rem;
}

.status-inprogress {
  background: #fff8e1;
  color: #7a5800;
  border: 1px solid #f0c040;
}

.status-class {
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid var(--accent-light);
}

.status-community {
  background: #f3eeff;
  color: #5b3ea8;
  border: 1px solid #a78bfa;
}

.status-internship {
  background: #f0faf0;
  color: #2a6b2a;
  border: 1px solid #6abf6a;
}

/* --- Skill Pills (Skills page) --- */
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  cursor: pointer;
}

.skill-pill:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* --- Filter Banner (Projects page) --- */
.filter-banner {
  background: var(--tag-bg);
  border-bottom: 1px solid var(--border-light);
  padding: 0.65rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.filter-banner .container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.filter-banner strong {
  font-family: var(--font-mono);
  color: var(--accent);
}

.filter-clear {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  transition: color 0.2s, border-color 0.2s;
}

.filter-clear:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* --- Card highlight / dim states (Projects filtering) --- */
.card.highlighted {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 76, 117, 0.12), 0 2px 12px rgba(15, 76, 117, 0.1);
}

.card.dimmed {
  opacity: 0.35;
  filter: grayscale(30%);
}

/* --- Profile Photo --- */
.bio-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.profile-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
}


/* --- Blog Feed (Projects page) --- */
.blog-feed {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-post {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.2s, opacity 0.3s;
}

.blog-post.highlighted {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 76, 117, 0.12), 0 2px 12px rgba(15, 76, 117, 0.1);
}

.blog-post.dimmed {
  opacity: 0.35;
  filter: grayscale(30%);
}

.blog-post-header {
  margin-bottom: 1.25rem;
}

.blog-post-header h2 {
  font-size: 1.3rem;
  margin: 0.4rem 0 0.75rem;
}

.blog-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
}

.blog-section h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.blog-section p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.blog-media {
  margin-top: 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.blog-media img,
.blog-media video {
  width: 100%;
  border-radius: var(--radius);
}

.blog-media .muted {
  font-size: 0.82rem;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
}

.blog-media-placeholder {
  margin-top: 1.25rem;
  padding: 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  background: var(--code-bg);
}

.blog-media-placeholder .muted {
  font-size: 0.82rem;
}

.blog-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.blog-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .bio-layout { flex-direction: column; align-items: center; }
  .profile-photo { width: 140px; height: 140px; }
  .info-grid { grid-template-columns: 1fr; gap: 0.25rem 0; }
  .info-grid dt { margin-top: 0.75rem; }
  section { padding: 2rem 0; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }

  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .card-grid { grid-template-columns: 1fr; }
}
