/* Fonts & variables */

@font-face {
  font-family: 'Amulya';
  src: url('assets/fonts/Amulya-Bold.woff2') format('woff2'),
       url('assets/fonts/Amulya-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Amulya';
  src: url('assets/fonts/Amulya-Regular.woff2') format('woff2'),
       url('assets/fonts/Amulya-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Amulya';
  src: url('assets/fonts/Amulya-Light.woff2') format('woff2'),
       url('assets/fonts/Amulya-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Synonym';
  src: url('assets/fonts/Synonym-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-color: #fff;
  --text-color: #2d3748;
  --text-secondary: #4a5568;
  --accent-color: #4a74b9;
  --accent-hover: #3a5c9e;
  --accent-rgba-light: rgba(74, 116, 185, 0.08);
  --accent-rgba-medium: rgba(74, 116, 185, 0.15);
  --accent-rgba-strong: rgba(74, 116, 185, 0.2);
  --accent-rgba-pulse: rgba(74, 116, 185, 0.4);
  --border-color: #e2e8f0;
  --shadow-color: rgba(0,0,0,0.05);
  --timeline-rgba-light: rgba(150, 150, 150, 0.25);
  --timeline-rgba-dark: rgba(150, 150, 150, 0.4);
  --animation-offset: 3px;
  --transition-time: 0.3s;
  --font-serif: 'Amulya', 'Synonym', 'Merriweather', Georgia, 'Times New Roman', serif;
}

/* Global base styles */

body {
  font-family: var(--font-serif);
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
  color: var(--text-color);
  background-color: var(--bg-color);
  font-weight: normal;
}

/* Generic text elements */
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color var(--transition-time) ease;
}

a:hover {
  color: var(--accent-hover);
}

em {
  font-style: italic;
  color: var(--text-secondary);
}

ul {
  padding-left: 1.25rem;
}

p {
  margin: 0.5rem 0 0.75rem;
}

strong {
  font-weight: 600;
  color: var(--accent-color);
}

section {
  margin-top: 2rem;
  margin-bottom: 0;
  scroll-margin-top: 1rem;
  animation: fadeIn 0.8s ease-out;
  width: 100%;
}

/* Typography */

h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
  letter-spacing: 0.03em;
  color: var(--text-color);
  line-height: 1.2;
}

h1 a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-time) ease;
}

h1 a:hover {
  color: var(--accent-color);
}

h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: bold;
  margin: 2.5rem 0 1.25rem 0;
  padding-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-color);
  line-height: 1.3;
}

h2 a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-time) ease;
}

h2 a:hover {
  color: var(--accent-color);
}

/* Layout: header & footer */

header {
  margin-bottom: -0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-content {
  flex: 1;
}

.header-image img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  transition: transform var(--transition-time) ease, box-shadow var(--transition-time) ease;
}

footer {
  margin-top: 4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Navigation */

nav {
  margin-top: 1.5rem;
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

nav a {
  text-decoration: none;
  color: var(--text-secondary);
  transition: all var(--transition-time) ease;
  font-weight: 400;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

nav a:hover {
  color: var(--accent-color);
  background-color: var(--accent-rgba-light);
  transform: translateX(var(--animation-offset));
}

.social-links-header {
  display: flex;
  gap: 0.75rem;
  margin: 1.2rem 0;
  flex-wrap: wrap;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border-color);
}

.social-links-header a {
  text-decoration: none;
  color: var(--text-secondary);
  transition: all var(--transition-time) ease;
  font-weight: 400;
  padding: 0.5rem 0.75rem;
  border-radius: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background-color: var(--bg-color);
  font-size: 0.95rem;
}

.social-links-header a:hover {
  color: var(--accent-color);
  transform: translateY(-2px);
}

.social-links-header a i {
  margin-right: 0.4rem;
}

.social-links-header a svg.social-icon {
  width: 1.3em;
  height: 1.3em;
  margin-right: 0.2rem;
  display: inline-block;
  vertical-align: -0.125em;
}

.social-links-header a svg.social-icon-small {
  width: 1.1em;
  height: 1.1em;
  margin-right: 0.2rem;
  display: inline-block;
  vertical-align: -0.125em;
}

/* Articles section */

#articles {
  margin-top: 3.75rem;
}

#articles-container {
  display: flex;
  flex-direction: column;
  margin-top: 0;
}

.article-item {
  margin-bottom: 0;
  padding: 0.75rem 1rem;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0 0 8px 0;
  display: flex;
  gap: 1.25rem;
  transition: all var(--transition-time) ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  box-shadow: 0 1px 3px var(--shadow-color);
}

.article-item:not(:last-child) {
  margin-bottom: 1.5rem;
}

.article-item:hover {
  border-right-color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  box-shadow: 0 4px 12px var(--accent-rgba-medium);
  transform: translateX(var(--animation-offset));
}

.article-content {
  flex: 1;
}

.article-title {
  font-family: var(--font-serif);
  font-weight: bold;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  margin-top: 0;
  color: var(--text-color);
}

.article-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-time) ease;
  display: block;
}

.article-item:hover .article-title a {
  color: var(--accent-color);
}

.article-content > p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0 0 0.5rem 0;
  line-height: 1.5;
}

/* Experience section */

#experience {
  margin-top: 3.75rem;
}

.experience-timeline {
  position: relative;
  margin-left: 1rem;
  padding-left: 1.5rem;
}

.experience-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: var(--timeline-rgba-light);
}

.experience-item {
  position: relative;
  margin-bottom: 2.25rem;
  transition: all var(--transition-time) ease;
}

.experience-item:hover {
  transform: translateX(var(--animation-offset));
}

.experience-timeline-dot {
  position: absolute;
  left: -1.825rem;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  background-color: var(--bg-color);
  border: 2px solid var(--timeline-rgba-dark);
  border-radius: 50%;
  z-index: 2;
}

.experience-content {
  transition: all var(--transition-time) ease;
}

.experience-dates {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  font-weight: 400;
}

.experience-position {
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 0.2rem;
  font-size: 1rem;
}

.classification {
  color: rgba(74, 85, 104, 0.8);
  font-weight: normal;
}

.experience-company {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Education section */

#education {
  margin-top: 3.75rem;
}

.education-timeline {
  position: relative;
  margin-top: 1.25rem;
  margin-left: 1rem;
  padding-left: 1.5rem;
}

.education-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: var(--timeline-rgba-light);
}

.education-item {
  position: relative;
  margin-bottom: 2.25rem;
  transition: all var(--transition-time) ease;
}

.education-item:hover {
  transform: translateX(var(--animation-offset));
}

.education-timeline-dot {
  position: absolute;
  left: -1.825rem;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  background-color: var(--bg-color);
  border: 2px solid var(--timeline-rgba-dark);
  border-radius: 50%;
  z-index: 2;
}

.education-content {
  transition: all var(--transition-time) ease;
}

.education-dates {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  font-weight: 400;
}

.education-degree {
  font-family: var(--font-serif);
  font-weight: 501;
  color: var(--text-color);
  margin-bottom: 0.2rem;
  font-size: 1rem;
}

.education-institution {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.education-institution a {
  color: var(--accent-color);
  text-decoration: none;
}

.education-institution a:hover {
  color: var(--accent-color);
}

/* Projects section */

#github-projects {
  margin-top: 3.75rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.project-card {
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0 0 8px 0;
  padding: 1.25rem;
  background-color: var(--bg-color);
  transition: all var(--transition-time) ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  box-shadow: 0 1px 3px var(--shadow-color);
}

.project-card:hover {
  border-right-color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  box-shadow: 0 4px 12px var(--accent-rgba-medium);
  transform: translateY(-2px);
}

.project-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0 0 0.75rem 0;
  color: var(--text-color);
  transition: color var(--transition-time) ease;
}

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

.project-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0 0 1rem 0;
  flex: 1;
  line-height: 1.5;
  display: flex;
  align-items: center;
}

.project-card:hover i {
  color: #fff;
}

/* Technical skills section */

#technical-skills {
  margin-top: 3.75rem;
}

.skills-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 1.25rem;
}

.skill-category {
  padding: 0;
}

.skill-category h3 {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0 0 1.5rem 0;
  color: rgba(74, 85, 104, 0.8);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tag {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background-color: rgba(245, 245, 245, 0.2);
  color: var(--text-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0 0 8px 0;
  font-size: 0.9rem;
  font-weight: bold;
  box-shadow: 0 1px 3px var(--shadow-color);
  transition: all var(--transition-time) ease;
}

.skill-tag:hover {
  transform: translateY(-2px);
}

/* Animations */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(var(--animation-offset));
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--accent-rgba-pulse);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(74, 116, 185, 0);
  }
  100% {
    box-shadow: 0 0 0 0 var(--accent-rgba-pulse);
  }
}

/* Responsive design */

@media (max-width: 768px) {
  /* Make header stack vertically on mobile */
  header {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  /* Center social links on mobile */
  .social-links-header {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Projects grid on mobile */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  /* Articles grid on mobile */
  #articles-container {
    grid-template-columns: 1fr;
  }

  /* Disable right-moving hover animations on mobile */
  .article-item:hover,
  nav a:hover,
  .social-links-header a:hover,
  .article-links a:hover,
  .project-card:hover {
    transform: none !important;
  }
}
