:root {
  --bg-main: #fdfbf7;        /* Warm off-white/cream */
  --bg-card: #ffffff;        /* Pure white for cards */
  --text-main: #2c3e50;      /* Deep charcoal / slate */
  --text-muted: #64748b;     /* Soft slate grey */
  --accent: #3a7ca5;         /* Muted modern slate-blue */
  --accent-light: rgba(58, 124, 165, 0.08);
  --border: #eae6df;         /* Warm grey border */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0; width: 100%;
  background: rgba(253, 251, 247, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: all 0.3s ease;
}
.navbar.scrolled {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
.nav-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: 1px;
}
.nav-links a {
  margin-left: 2rem;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* ── CONTAINER ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 7rem 2rem 0;
}

/* ── HERO ── */
.hero { 
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: 5rem; 
  padding-bottom: 4rem; 
  border-bottom: 1px solid var(--border); 
  
}
.hero-content { flex: 1; }
.hero-image { flex-shrink: 0; }
.hero-image img {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-card);
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
/*.hero-image img:hover {
  /* Shifts from a perfect circle to a soft, dynamic squircle/blob */
  /* border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  border-color: var(--accent);
  transform: rotate(-5deg) scale(1.05);
  box-shadow: 0 15px 35px var(--accent-light);
} */
.hero-image img:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.title-group {
  display: inline-block; /* Forces the container to exactly fit the width of "SATHYAJITH" */
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase
  color: var(--text-main);
  margin-bottom: 0.2rem;
  line-height: 1;
  margin-right: -2.5px
}
.hero h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0;
  width: 100%;
  text-align: justify;
  text-align-last: justify;
}
.hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 750px;
  margin-bottom: 2rem;
}
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.btn-primary { 
  background-color: var(--text-main); 
  color: #fff; 
  border: 1px solid var(--text-main);
  box-shadow: 0 4px 14px rgba(44, 62, 80, 0.15);
}
.btn-primary:hover { 
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 62, 80, 0.2);
}

/* ── SECTIONS ── */
section { margin-bottom: 6rem; }
.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 2.5rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
}
.section-title::after {
  content: "";
  height: 2px;
  flex: 1;
  background: var(--border);
  margin-left: 1.5rem;
}

/* ── EDUCATION & SKILLS GRIDS ── */
.edu-grid, .skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.edu-card {
  background: var(--bg-card);
  padding: 1.8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.edu-card:hover { 
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(44, 62, 80, 0.06);
}

.edu-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.3rem; }
.edu-card p { font-size: 0.95rem; color: var(--text-muted); }
.edu-card .year { font-size: 0.85rem; font-weight: 700; color: var(--accent); margin-top: 0.8rem; display: inline-block;}

.skill-category h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text-main);
}
.skill-list { list-style: none; }
.skill-list li {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
}
.skill-list li::before {
  content: '▹';
  color: var(--accent);
  margin-right: 0.75rem;
  font-weight: bold;
}

/* ── PROJECTS (2-COLUMN GRID) ── */
.projects-grid { 
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: 2rem; 
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.project-card:hover { 
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(44, 62, 80, 0.08);
}
/* Highlight pinned card */
.pinned-card {
  /*border: 2px solid var(--accent);*/
  position: relative;
} 
/* Diagonal Pin in the top right corner */
.pin-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 22px;
  height: 22px;
  color: var(--accent);
  transform: rotate(45deg); /* Tilts the pin diagonally */
  opacity: 0.85;
}
.project-header {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; flex-wrap: wrap; gap: 1rem;
}
/*.project-title { 
  font-size: 1.25rem; 
  font-weight: 700; 
  color: var(--text-main); 
  display: flex;
  align-items: center;
  gap: 0.5rem;
} */

.project-title { 
  font-size: 1.25rem; 
  font-weight: 700; 
  color: var(--text-main); 
  max-width: 85%; /* Ensures text doesn't overlap the pin */
}
.pin-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}
.project-date { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.project-award {
  display: inline-block; font-size: 0.75rem; font-weight: 700; background: var(--accent-light); color: var(--accent);
  padding: 0.3rem 0.8rem; border-radius: 6px; margin-top: 0.6rem;
}
.project-desc { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.95rem; flex-grow: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.tag { font-size: 0.75rem; font-weight: 600; background: var(--bg-main); color: var(--text-muted); padding: 0.3rem 0.8rem; border-radius: 6px; border: 1px solid var(--border); }
.project-link { font-size: 0.9rem; font-weight: 700; color: var(--accent); text-decoration: none; margin-top: auto; }
.project-link:hover { text-decoration: underline; }

/* ── GRID TIMELINE ── */
.grid-timeline { display: flex; flex-direction: column; gap: 2rem; }
.grid-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.grid-row:last-child { border-bottom: none; padding-bottom: 0; }
.grid-time h4 { color: var(--accent); font-size: 1rem; margin-bottom: 0.2rem; }
.grid-time span { color: var(--text-muted); font-size: 0.95rem; font-weight: 600; }
.grid-content h3 { color: var(--text-main); font-size: 1.15rem; margin-bottom: 0.5rem; }
.grid-content p { color: var(--text-muted); font-size: 0.95rem; }

/* ── FOOTER & PNG ICONS ── */
footer {
  text-align: center; 
  padding: 3rem 0 1.5rem; 
  border-top: 1px solid var(--border); 
  color: var(--text-muted); 
  font-size: 0.9rem;
}
.social-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.social-links a { 
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: all 0.3s; 
}
.social-links a img {
  width: 20px;
  height: 20px;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.social-links a:hover { 
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.social-links a:hover img {
  opacity: 1;
}

/* ── SCROLL REVEAL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ── MOBILE RESPONSIVENESS ── */
@media (max-width: 900px) {
  /* Switch projects to 1 column on tablets/mobile */
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { flex-direction: column-reverse; text-align: center; gap: 2rem; margin-top: 2rem; }
  .hero-image img { width: 150px; height: 150px; }
  .hero h1 { font-size: 2.8rem; }
  .btn-group { justify-content: center; }
  .grid-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .grid-time { margin-bottom: 0.5rem; }
  .section-title::after { display: none; } /* Remove line on mobile */
}
