/*
  Professional dark portfolio theme
  Single-page layout: header, hero, about, experience, projects, skills, contact
*/
:root {
  --bg-dark: #1e293b;
  --bg-navy: #0f172a;
  --bg-card: #334155;
  --bg-card-hover: #3b4a5f;
  --bg-0: #0a192f;
  --bg-1: #112240;
  --divider: rgba(255, 255, 255, 0.1);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --border: rgba(255, 255, 255, 0.1);
  --max-width: 87.5rem; /* 1400px */
  --section-padding: 4rem 1rem;
  --panel-padding-y: 4rem;
  --radius: 0.5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-0);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
}

/* Header */
.portfolio-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.portfolio-header .logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.portfolio-header nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.portfolio-header nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.portfolio-header nav a:hover {
  color: var(--accent);
}

.portfolio-header .btn-resume {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--accent);
  color: #fff !important;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.portfolio-header .btn-resume:hover {
  background: var(--accent-hover);
}

/* Hero */
.portfolio-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.25rem 4rem;
  background-color: var(--bg-0);
  background-image: url("https://images.pexels.com/photos/1229861/pexels-photo-1229861.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.portfolio-hero.panel {
  padding: 6rem 1.25rem 4rem;
}

.portfolio-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(17, 24, 39, 0.95), rgba(30, 58, 138, 0.95));
  pointer-events: none;
}

.portfolio-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
  max-width: 90rem;
}

.portfolio-hero-text h1 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.portfolio-hero-text .tagline {
  font-size: 1.25rem;
  color: var(--accent);
  margin: 0 0 1rem;
  font-weight: 500;
}

.portfolio-hero-text .description {
  color: #f1f5f9;
  margin: 0 0 1.5rem;
  max-width: 32rem;
  font-size: 1.05rem;
}

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

.portfolio-hero-buttons .btn-primary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.portfolio-hero-buttons .btn-primary:hover {
  background: var(--accent-hover);
}

.portfolio-hero-buttons .btn-outline {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--accent);
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--accent);
  transition: background 0.2s, color 0.2s;
}

.portfolio-hero-buttons .btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

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

.portfolio-hero-image img {
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 1px var(--border);
}

.portfolio-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent);
  font-size: 1.5rem;
  z-index: 2;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* Section common */
.portfolio-section {
  padding: var(--section-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Alternating panel backgrounds: full-width, content constrained by panel-inner */
.panel {
  width: 100%;
  padding: var(--panel-padding-y) 0;
  position: relative;
  box-sizing: border-box;
}

.panel + .panel {
  border-top: 1px solid var(--divider);
}

.panel--0 {
  background: var(--bg-0);
}

.panel--1 {
  background: var(--bg-1);
}

.panel-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .panel {
    padding: 5rem 0;
  }
  .panel-inner {
    padding: 0 1.25rem;
  }
}

@media (min-width: 1200px) {
  .panel {
    padding: 5.5rem 0;
  }
  .panel-inner {
    padding: 0 1.5rem;
  }
}

/* Sections that are panels: full width, no max-width; padding from .panel */
.portfolio-section.panel {
  max-width: none;
  margin: 0;
}

.portfolio-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 0.5rem;
}

.portfolio-section .section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 2.5rem;
  font-size: 0.95rem;
}

/* Decorative line under section heading (e.g. Projects) */
.section-heading-with-line {
  position: relative;
  margin-bottom: 0.75rem;
}

.section-heading-with-line::after {
  content: '';
  display: block;
  width: 4rem;
  height: 3px;
  background: var(--accent);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* About section - dark blue-grey background, centered content (matches screenshot) */
.about-section {
  padding: 4rem 1rem;
  background: #21252d;
  max-width: none;
  margin: 0;
}

@media (min-width: 768px) {
  .about-section {
    padding: 6rem 1.5rem;
  }
}

.about-container {
  width: 100%;
  max-width: 768px;
  margin-left: auto;
  margin-right: auto;
}

.about-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 1.5rem;
  color: #ffffff;
}

/* About Me card - slightly lighter box */
.about-card {
  background: #3a4049;
  color: #ffffff;
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2rem;
}

.about-card p {
  margin: 0 0 1rem;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: left;
}

.about-card p:last-child {
  margin-bottom: 0;
}

/* Download Resume button - centered, blue */
.about-actions {
  text-align: center;
  margin-top: 0;
}

.btn-download-resume {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #337ab7;
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s;
}

.btn-download-resume:hover {
  background: #286090;
}

/* Recent Updates - card list; panel background overrides when .panel--0 */
.updates-section {
  background: #282c34;
}

.updates-section.panel--0 {
  background: var(--bg-0);
}

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 56rem;
  margin: 0 auto;
}

.update-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: #2e333a;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.2s;
}

.update-card:hover {
  background: #353b44;
}

.update-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border: 2px solid currentColor;
}

.update-icon--experience {
  color: #22c55e;
}

.update-icon--research {
  color: #3b82f6;
}

.update-icon--project {
  color: #a855f7;
}

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

.update-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.update-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.update-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  color: #fff;
}

.update-tag--experience {
  background: #22c55e;
}

.update-tag--research {
  background: #3b82f6;
}

.update-tag--project {
  background: #a855f7;
}

.update-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.update-date i {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .update-card {
    flex-wrap: wrap;
  }

  .update-date {
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
}

/* Experience cards */
/* Professional Experience - section + container (like Gurleen's structure) */
.experience-section {
  padding: 4rem 0;
  background: #111827;
  max-width: none;
  margin: 0;
}

.experience-section.panel--1 {
  background: var(--bg-1);
}

@media (min-width: 768px) {
  .experience-section {
    padding: 6rem 0;
  }
}

.experience-container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 0.75rem;
}

@media (min-width: 768px) {
  .experience-container {
    padding: 0 1.25rem;
  }
}

@media (min-width: 1200px) {
  .experience-container {
    padding: 0 1.5rem;
  }
}

.experience-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 2rem;
  color: var(--text);
}

/* Experience: 2-col desktop (equal-height cards), 1-col mobile */
/* Experience grid: 1 col mobile, 2 cols tablet (≥768px), 3 cols large (≥1200px) */
.experience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .experience-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }
}

@media (min-width: 1200px) {
  .experience-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }
}

.experience-grid--other {
  margin-top: 0.5rem;
}

.experience-subheading {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.experience-card {
  background: #1e293b;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

/* Featured badge */
.exp-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  background: rgba(34, 197, 94, 0.9);
  color: #fff;
  border-radius: 0.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.experience-card--featured {
  border-color: rgba(59, 130, 246, 0.2);
}

.experience-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: translateY(-4px);
}

.experience-card:hover .card-cover {
  transform: scale(1.03);
}

/* Card cover: 150px, image + dark overlay, top radius only */
.card-cover {
  height: 150px;
  min-height: 150px;
  background-image: url("../../images/AI.jpg");
  background-size: cover;
  background-position: center;
  border-radius: 0.5rem 0.5rem 0 0;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease;
  transform-origin: center center;
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.75) 0%,
    rgba(15, 23, 42, 0.5) 50%,
    rgba(15, 23, 42, 0.85) 100%
  );
  pointer-events: none;
}

.exp-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Typography hierarchy: title > org > meta > summary > bullets > chips */
.exp-header {
  margin-bottom: 0.75rem;
}

.exp-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #60a5fa;
  margin: 0 0 0.35rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.exp-org {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.exp-meta {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Role summary: clamp to 2 lines */
.exp-summary {
  font-size: 0.875rem;
  line-height: 1.45;
  color: #e2e8f0;
  margin: 0 0 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Bullets: show first 2 by default; 3rd+ hidden until "Show more" */
.exp-bullets {
  margin: 0 0 0.35rem;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.exp-bullets li {
  margin-bottom: 0.35rem;
}

.exp-bullets li:last-child {
  margin-bottom: 0;
}

.exp-bullets li:nth-child(n+3) {
  display: none;
}

.experience-card.expanded .exp-bullets li:nth-child(n+3) {
  display: list-item;
}

.exp-toggle-bullets {
  display: none;
  margin: 0 0 0.75rem;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #60a5fa;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.experience-card:has(.exp-bullets li:nth-child(3)) .exp-toggle-bullets {
  display: inline-block;
}

.exp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.2rem;
}

/* Chips: show max 6 by default; 7th+ hidden until "+X more" */
.exp-chip:nth-child(n+7) {
  display: none;
}

.experience-card.expanded-chips .exp-chip:nth-child(n+7) {
  display: inline-flex;
}

.exp-toggle-chips {
  display: none;
  align-self: flex-start;
  margin: 0.35rem 0 0;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #93c5fd;
  background: rgba(30, 64, 175, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 0.25rem;
  cursor: pointer;
}

.experience-card:has(.exp-chip:nth-child(7)) .exp-toggle-chips {
  display: inline-flex;
}

/* Card action buttons (GitHub, Live Demo) */
.exp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.exp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.35rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.exp-btn--gh {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.exp-btn--gh:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.exp-btn--demo {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.exp-btn--demo:hover {
  background: rgba(59, 130, 246, 0.35);
  border-color: rgba(59, 130, 246, 0.6);
  color: #bfdbfe;
}

/* Chips: subtle outline / lower-contrast fill; slightly smaller */
.exp-chip {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  background: rgba(30, 64, 175, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 0.25rem;
  letter-spacing: 0.02em;
}

/* Other Experience: single compact card */
.experience-card--compact .exp-content {
  padding: 1.125rem 1.25rem;
}

.experience-card--compact .exp-summary {
  margin-bottom: 0.65rem;
}

.experience-card--compact .exp-bullets {
  margin-bottom: 0.35rem;
}

@media (max-width: 767px) {
  .card-cover {
    height: 120px;
    min-height: 120px;
  }

  .exp-content {
    padding: 1rem;
  }

  .exp-header h3 {
    font-size: 1.05rem;
  }

  .exp-summary,
  .exp-bullets {
    font-size: 0.8125rem;
  }
}

/* Projects grid: 1 col <768px, 2 cols >=768px, 3 cols >=1200px; equal height cards */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }
}

@media (min-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  background: rgba(51, 65, 85, 0.6);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  background: rgba(59, 74, 95, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Project image: fixed height 180px, overlay */
.project-card-image {
  position: relative;
  width: 100%;
  height: 180px;
  min-height: 180px;
  overflow: hidden;
  flex-shrink: 0;
}

.project-card .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #1e293b;
}

.project-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.4) 0%,
    rgba(15, 23, 42, 0.1) 40%,
    rgba(15, 23, 42, 0.5) 100%
  );
  pointer-events: none;
}

.project-card .card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.project-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.project-card h3 a:hover {
  color: var(--accent);
}

.project-card .date {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  flex-shrink: 0;
}

.project-card .card-body > p:not(.date),
.project-card .card-description-wrap > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.project-card.is-expanded .card-description-wrap > p {
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}

.project-card .card-description-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.project-card .card-show-more {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  flex-shrink: 0;
}

.project-card .card-show-more:hover {
  text-decoration: underline;
}

.project-card .card-show-more.hidden {
  display: none;
}

.project-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.25rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  flex-shrink: 0;
}

.project-card .card-link .card-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: inherit;
  opacity: 0.95;
}

.project-card .card-link:hover {
  text-decoration: underline;
}

/* Thesis & Research: same card as Projects + badge */
.thesis-section .projects-grid {
  /* Reuses Projects grid: 1/2/3 cols, same gap */
}

.project-card.thesis-card {
  position: relative;
}

.thesis-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  background: rgba(139, 92, 246, 0.9);
  color: #fff;
  border-radius: 0.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Skills - placeholder */
/* Skills: 8 cards, responsive grid 3/2/1 cols, equal height */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }
}

@media (min-width: 1200px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }
}

.skill-card {
  background: rgba(51, 65, 85, 0.6);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.skill-card:hover {
  background: rgba(59, 74, 95, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.skill-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem;
  line-height: 1.35;
  flex-shrink: 0;
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-content: flex-start;
}

.skill-chip {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  background: rgba(30, 64, 175, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 0.25rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

/* Education: compact timeline layout, consistent with other sections */
.education-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 1.5rem;
  color: var(--text);
}

.education-timeline {
  max-width: 50rem;
  margin: 0 auto;
  position: relative;
  padding-left: 1.5rem;
}

/* Vertical line - thinner and less prominent */
.education-timeline::before {
  content: '';
  position: absolute;
  left: 0.25rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0.5;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

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

.timeline-dot {
  position: absolute;
  left: -1.25rem;
  top: 0.35rem;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg-1);
  z-index: 1;
}

.timeline-card {
  background: rgba(51, 65, 85, 0.6);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.timeline-card:hover {
  background: rgba(59, 74, 95, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(3px);
}

.timeline-year {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.timeline-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
  line-height: 1.35;
}

.timeline-org {
  display: block;
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.timeline-location {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

@media (max-width: 767px) {
  .education-timeline {
    padding-left: 1.25rem;
  }
  
  .timeline-item {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .timeline-dot {
    left: -1rem;
    width: 0.4rem;
    height: 0.4rem;
  }
  
  .timeline-card {
    padding: 1rem;
  }
  
  .timeline-card h3 {
    font-size: 0.95rem;
  }
}

/* Publications: tabs + list, dark theme, same typography as Projects/Experience */
.publications-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 2rem;
  color: var(--text);
}

.publications-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .publications-container {
    padding: 0 1.25rem;
  }
}

@media (min-width: 1200px) {
  .publications-container {
    padding: 0 1.5rem;
  }
}

.publications-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.pub-tab {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.pub-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.pub-tab.active {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
}

.pub-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pub-panel {
  min-height: 0;
}

.publications-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-list-extra {
  display: none;
  margin-top: 0;
}

.pub-list-extra.is-open {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

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

.pub-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

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

.pub-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
  line-height: 1.4;
}

.pub-venue {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.85;
  line-height: 1.4;
}

.pub-link {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.pub-link:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text);
}

.pub-toggle {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0.25rem 0;
}

.pub-toggle:hover {
  color: var(--accent-hover);
}

.pub-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .pub-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }

  .pub-link {
    align-self: flex-end;
  }
}

/* Leadership & Recognition: merged section, 2-col (featured left, stack right), glow + icons */
.leadership-recognition-section {
  position: relative;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  .leadership-recognition-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

.leadership-recognition-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 50% at 50% 50%, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
}

.leadership-recognition-section h2 {
  position: relative;
  font-size: 1.9rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 2.5rem;
  color: var(--text);
}

.leadership-recognition-container {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .leadership-recognition-container {
    padding: 0 1.25rem;
  }
}

@media (min-width: 1200px) {
  .leadership-recognition-container {
    padding: 0 1.5rem;
  }
}

.leadership-recognition-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .leadership-recognition-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem;
    align-items: start;
  }
}

.leadership-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.leadership-card {
  background: rgba(51, 65, 85, 0.6);
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.leadership-card:hover {
  background: rgba(59, 74, 95, 0.8);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.leadership-card--featured {
  padding: 2rem 2rem;
}

@media (min-width: 768px) {
  .leadership-card--featured {
    padding: 2.25rem 2.5rem;
  }
}

.leadership-card--compact {
  padding: 1.5rem 1.75rem;
}

.leadership-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.9rem;
  line-height: 1.4;
}

.leadership-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--accent);
  opacity: 0.9;
}

.leadership-role {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 0.9rem;
  line-height: 1.55;
}

.leadership-bullets {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.leadership-bullets li {
  margin-bottom: 0.6rem;
}

.leadership-bullets li:last-child {
  margin-bottom: 0;
}

.leadership-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.leadership-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  background: rgba(30, 64, 175, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 0.25rem;
}

.leadership-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}

.leadership-list li {
  margin-bottom: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.55;
}

.leadership-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.leadership-year {
  color: var(--text-muted);
  font-weight: 500;
  opacity: 0.9;
}

/* Certifications: compact row list layout matching Publications */
.certifications-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 1.5rem;
  color: var(--text);
}

.certifications-container {
  max-width: 56rem;
  margin: 0 auto;
}

.certifications-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease, transform 0.15s ease;
}

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

.cert-row:hover {
  background: rgba(255, 255, 255, 0.02);
  transform: translateX(2px);
}

.cert-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cert-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.cert-issuer {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.85;
  line-height: 1.4;
}

.cert-date {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 9999px;
}

@media (max-width: 767px) {
  .cert-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .cert-date {
    align-self: flex-end;
  }
}

.skills-placeholder {
  background: rgba(51, 65, 85, 0.6);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  text-align: center;
  font-size: 0.9rem;
}

/* Contact Me - single centered card */
.contact-card-wrapper {
  max-width: 32rem;
  margin: 0 auto;
  background: rgba(51, 65, 85, 0.6);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 0;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
  border-bottom: 1px solid var(--border);
}

.contact-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.contact-row:first-child {
  padding-top: 0;
}

.contact-row:hover {
  opacity: 0.9;
}

.contact-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.contact-info strong {
  color: var(--text);
  font-size: 1rem;
}

.contact-detail {
  color: var(--text-muted);
  font-size: 0.85rem;
  word-break: break-all;
}

/* Footer */
.portfolio-footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.portfolio-footer .copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.portfolio-footer .social {
  display: flex;
  gap: 1rem;
}

.portfolio-footer .social a {
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: color 0.2s;
}

.portfolio-footer .social a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  .portfolio-header nav {
    gap: 1rem;
  }

  .portfolio-header nav a:not(.btn-resume) {
    display: none;
  }

  .portfolio-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .portfolio-hero-text .description {
    margin-left: auto;
    margin-right: auto;
  }

  .portfolio-hero-buttons {
    justify-content: center;
  }

  .portfolio-hero-image {
    order: -1;
  }

  .portfolio-hero-image img {
    width: 260px;
    height: 260px;
  }
}
