/* === Resume Style (LaTeX-inspired) === */

/* Import Font Awesome for icons */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');

/* Theme Variables */
:root {
  --bg-color: #e6ddc5;
  --text-color: #1a1a1a;
  --border-color: #333;
  --link-color: #14438f;
  --header-text: #1a1a1a;
}

[data-theme="dark"] {
  --bg-color: #282828;
  --text-color: #f2e5bc;
  --border-color: #504945;
  --link-color: #e78a4e;
  --link-color: #fabd2f;
  --header-text: #f2e5bc;
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--text-color);
  color: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1000;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* Base document */
body {
  max-width: 900px;
  margin: 2em auto 4em auto;
  font-family: "Latin Modern Roman", "Computer Modern", Georgia, "Times New Roman", serif;
  font-size: 14pt;
  line-height: 1.2;
  color: var(--text-color);
  text-align: justify;
  padding: 0 1em 2em 1em;
  background-color: var(--bg-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

/* Ensure html element uses theme background */
html {
  background-color: #e6ddc5;
  transition: background-color 0.3s ease;
}

html[data-theme="dark"] {
  background-color: #282828;
}

/* Headings */
h1 {
  font-family: "Computer Modern", "Latin Modern Roman", Georgia, serif;
  font-size: 14pt;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 20px;
  margin-bottom: 5px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  color: var(--header-text);
}

[data-theme="dark"] h1 {
  color: #d3869b;
  -webkit-text-fill-color: #d3869b;
}

h2, h3 {
  font-family: "Computer Modern", "Latin Modern Roman", Georgia, serif;
  font-weight: 600;
  margin-top: 1.2em;
  margin-bottom: 0.4em;
  color: var(--header-text);
}

[data-theme="dark"] h2,
[data-theme="dark"] h3 {
  color: #d3869b;
  -webkit-text-fill-color: #d3869b;
}

h2 {
  font-size: 1.2em;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2px;
  margin-top: 1.5em;
}

h3 {
  font-size: 1em;
  font-style: italic;
}

/* Section spacing */
section {
  margin-bottom: 0.8em;
}

/* Links */
a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

a:hover {
  text-decoration: underline;
}

/* Lists */
ul {
  padding-left: 0.15in;
  margin: 0;
  list-style: none;
}



li {
  margin-bottom: 8px;
  text-align: justify;
}

/* Experience section - no bullets for main entries, full width */
#experience > ul,
#programming-projects > ul {
  padding-left: 0;
}

#experience > ul > li,
#programming-projects > ul > li {
  list-style: none;
  margin-bottom: 15px;
  padding-left: 0;
}

/* Bullet points only for nested lists (job responsibilities) */
ul ul {
  list-style-type: disc;
  padding-left: 1.2em;
  margin-top: 5px;
  text-align: justify;
}

ul ul li {
  margin-bottom: 3px;
  text-align: justify;
  text-align-last: left;
}

/* Special handling for Experience section content */
#experience ul ul li p,
#experience ul ul li span,
#programming-projects ul ul li p,
#programming-projects ul ul li span {
  text-align: justify;
  text-align-last: left;
  margin: 0;
  padding: 0;
}

/* Resume header block */
.center {
  text-align: center;
  margin-bottom: 1.5em;
  font-size: 14pt;
  color: var(--header-text);
  line-height: 1.2;
}

.center strong {
  font-size: 24pt;
  display: block;
  margin-bottom: 8pt;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: bold;
  color: var(--header-text);
}

[data-theme="dark"] .center strong {
  color: #d3869b;
  -webkit-text-fill-color: #d3869b;
}

.center p {
  text-align: center;
  margin: 0;
}

/* Header contact info */
.center a {
  color: var(--header-text);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.center a:hover {
  text-decoration: underline;
}

/* Icon styles using CSS pseudo-elements based on content */

/* Phone icon for "Phone number available upon request" - more specific selector */
.center p span:first-of-type:not(.smallcaps)::before {
  font-family: FontAwesome;
  content: "\f10b";
  margin-right: 0.5em;
  color: #000; /* Black for light mode */
}

[data-theme="dark"] .center p span:first-of-type:not(.smallcaps)::before {
  color: var(--text-color); /* Match text foreground */
}

/* Email icon for email links */
.center a[href^="mailto:"]::before {
  font-family: FontAwesome;
  content: "\f1fa";
  margin-right: 0.5em;
  color: #000; /* Black for light mode */
}

[data-theme="dark"] .center a[href^="mailto:"]::before {
  color: var(--text-color); /* Match text foreground */
}

/* LinkedIn icon for LinkedIn links */
.center a[href*="linkedin"]::before {
  font-family: FontAwesome;
  content: "\f08c";
  margin-right: 0.5em;
  color: #000; /* Black for light mode */
}

[data-theme="dark"] .center a[href*="linkedin"]::before {
  color: var(--text-color); /* Match text foreground */
}

/* GitHub icon for GitHub links */
.center a[href*="github"]::before {
  font-family: FontAwesome;
  content: "\f09b";
  margin-right: 0.5em;
  color: #000; /* Black for light mode */
}

[data-theme="dark"] .center a[href*="github"]::before {
  color: var(--text-color); /* Match text foreground */
}

/* Location icon for maps/location links */
.center a[href*="maps.app.goo.gl"]::before {
  font-family: FontAwesome;
  content: "\f041";
  margin-right: 0.5em;
  color: #000; /* Black for light mode */
}

[data-theme="dark"] .center a[href*="maps.app.goo.gl"]::before {
  color: var(--text-color); /* Match text foreground */
}

/* Tables (for education, experience entries) */
table {
  width: 100%;
  margin-bottom: 7pt;
  border-collapse: collapse;
}

table td {
  padding: 0;
  vertical-align: top;
  line-height: 1.1;
}

table td:first-child {
  text-align: left;
  width: 70%;
}

table td:last-child {
  text-align: right;
  width: 30%;
}

/* Strong text in tables (job titles, institutions) */
table strong {
  font-weight: bold;
}

table em {
  font-style: italic;
  font-size: 14pt;
}

/* Itemize blocks */
.itemize {
  margin: 0;
  padding: 0;
}

.itemize p {
  margin: 0;
  padding: 0;
  text-align: justify;
  font-size: 14pt;
}

.itemize span {
  text-align: justify;
  text-align-last: left;
}

/* Small caps for name */
.smallcaps {
  font-variant: small-caps;
  letter-spacing: 0.5px;
}

/* Math inline */
.math.inline {
  font-style: normal;
}

/* Spacing adjustments */
p {
  margin: 0 0 5pt 0;
  text-align: justify;
}

/* Remove default margins from first/last elements */
*:first-child {
  margin-top: 0;
}

*:last-child {
  margin-bottom: 0;
}

/* Page breaks and spacing for better layout */
h1 {
  page-break-after: avoid;
}

li > table {
  margin-bottom: 5pt;
}

li > ul {
  margin-top: 0;
  margin-bottom: 5pt;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
  body {
    margin: 0;
    padding: 1em;
    font-size: 12pt;
  }

  .theme-toggle {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .center {
    margin-top: 0;
    padding-top: 0;
  }

  .center strong {
    font-size: 20pt;
    margin-bottom: 6pt;
  }

  h1 {
    font-size: 13pt;
    margin-top: 15px;
  }

  h2 {
    font-size: 1.1em;
  }

  table td:first-child {
    width: 60%;
  }

  table td:last-child {
    width: 40%;
    font-size: 11pt;
  }

  ul ul {
    padding-left: 1em;
  }
}

/* Ensure consistent print/export */
/* Gradient animation for name */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@media print {
  body {
    font-size: 14pt;
    color: #000;
    margin: 0;
    padding: 0.5in;
  }
  a {
    color: #000;
    text-decoration: none;
  }

  h1 {
    page-break-after: avoid;
  }

  table {
    page-break-inside: avoid;
  }

  .theme-toggle {
    display: none;
  }
}
