/*─────────────────────────────────────────────────────────────────
  style.css — Global Styles and Theme System
─────────────────────────────────────────────────────────────────*/

/* Root variables for light and dark themes */
:root {
  /* Light mode colors */
  --bg: #f7f8fa;
  --text: #181a1b;
  --accent: #2684FF;
  --card: #fff;
  --header-bg: #fff;
  --header-border: #e2e6ea;
  --btn-bg: #2684FF;
  --btn-text: #fff;
}

body.dark-mode {
  /* Dark mode overrides */
  --bg: #181a1b;
  --text: #f7f8fa;
  --accent: #60a8fa;
  --card: #242526;
  --header-bg: #232324;
  --header-border: #222225;
  --btn-bg: #3a71c9;
  --btn-text: #fff;
}

/*─────────────────────────────────────────────────────────────────
  Global Reset
─────────────────────────────────────────────────────────────────*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  min-height: 100%;
  line-height: 1.6;
}

/*─────────────────────────────────────────────────────────────────
  Header Section
─────────────────────────────────────────────────────────────────*/
header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.8em 1.5em;
  transition: background 0.3s, border 0.3s;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 920px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 1.5em;
}

header h1 {
  margin: 0 0 0.15em 0;
  font-size: 2.3em;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.subtitle {
  margin: 0;
  opacity: 0.8;
  font-size: 1.12em;
}

.controls {
  display: flex;
  align-items: center;
  gap: 1em;
}

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  padding: 0.45em 1em 0.45em 0.7em;
  border-radius: 2em;
  display: flex;
  align-items: center;
  gap: 0.50em;
  transition: background 0.2s, color 0.2s;
}
#theme-toggle:hover,
#theme-toggle:focus {
  background: var(--card);
}

.icon-moon:before {
  content: "🌙";
  font-size: 1.15em;
  vertical-align: -2px;
}
body.dark-mode .icon-moon:before {
  content: "☀️";
}

.btn-download {
  background: var(--btn-bg);
  color: var(--btn-text);
  padding: 0.51em 1.2em;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 2em;
  transition: background 0.2s;
  font-size: 1.02em;
  box-shadow: 0 2px 8px 0 rgba(38,132,255,0.07);
}
.btn-download:hover,
.btn-download:focus {
  background: #145db2;
}

/*─────────────────────────────────────────────────────────────────
  Main Content Section
─────────────────────────────────────────────────────────────────*/
main {
  max-width: 850px;
  margin: 2.1em auto 2.7em;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(38,132,255,0.06);
  padding: 2em 2.3em;
  transition: background 0.3s;
}

/* Section headings */
section:not(:first-child) {
  margin-top: 2.2em;
}
section h2 {
  margin-top: 0;
  letter-spacing: -0.2px;
  color: var(--accent);
  font-size: 1.32em;
}

/*─────────────────────────────────────────────────────────────────
  Skills Section
─────────────────────────────────────────────────────────────────*/
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1em 2.1em;
  list-style: none;
  margin: 0.7em 0 0 0;
  padding: 0;
}
.skills-list li {
  background: rgba(38,132,255,0.09);
  border-radius: 6px;
  padding: 0.33em 0.88em;
  font-weight: 500;
}
body.dark-mode .skills-list li {
  background: rgba(96,168,250,0.13);
}

/*─────────────────────────────────────────────────────────────────
  Education Section
─────────────────────────────────────────────────────────────────*/
#education {
  margin-top: 3em;
}
#education h2 {
  margin-bottom: 1.8em;
  position: relative;
}
#education h2::after {
  content: '';
  position: absolute;
  bottom: -0.5em;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(38,132,255,0.3));
  border-radius: 2px;
}

.education-card {
  background: rgba(38,132,255,0.03);
  border: 1px solid rgba(38,132,255,0.08);
  border-radius: 12px;
  padding: 1.8em;
  margin-bottom: 1.5em;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.education-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), rgba(38,132,255,0.6));
}
.education-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(38,132,255,0.12);
  border-color: rgba(38,132,255,0.15);
}
body.dark-mode .education-card {
  background: rgba(96,168,250,0.06);
  border-color: rgba(96,168,250,0.12);
}
body.dark-mode .education-card:hover {
  border-color: rgba(96,168,250,0.2);
  box-shadow: 0 8px 25px rgba(96,168,250,0.15);
}

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2em;
}

.degree-info h3 {
  margin: 0 0 0.3em 0;
  font-size: 1.25em;
  font-weight: 600;
  color: var(--text);
}

.institution {
  margin: 0 0 0.5em 0;
  font-size: 1.05em;
  color: var(--accent);
  font-weight: 500;
}

.graduation-year {
  display: inline-block;
  background: rgba(38,132,255,0.1);
  color: var(--accent);
  padding: 0.25em 0.8em;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 500;
}
body.dark-mode .graduation-year {
  background: rgba(96,168,250,0.15);
}

.education-icon {
  flex-shrink: 0;
  margin-left: 1em;
}
.degree-level {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9em;
  box-shadow: 0 4px 12px rgba(38,132,255,0.25);
}

.education-details {
  display: grid;
  gap: 1.2em;
}

.education-meta {
  display: flex;
  gap: 1.5em;
  flex-wrap: wrap;
}

.gpa, .honors {
  font-size: 0.95em;
  font-weight: 500;
  padding: 0.4em 0.9em;
  border-radius: 6px;
}
.gpa {
  background: rgba(34,197,94,0.1);
  color: #16a34a;
  border: 1px solid rgba(34,197,94,0.2);
}
.honors {
  background: rgba(168,85,247,0.1);
  color: #9333ea;
  border: 1px solid rgba(168,85,247,0.2);
}
body.dark-mode .gpa {
  background: rgba(34,197,94,0.15);
  color: #4ade80;
}
body.dark-mode .honors {
  background: rgba(168,85,247,0.15);
  color: #c084fc;
}

.relevant-coursework h4 {
  margin: 0 0 0.7em 0;
  font-size: 1em;
  color: var(--text);
  opacity: 0.9;
}
.coursework-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5em;
  list-style: none;
  margin: 0;
  padding: 0;
}
.coursework-list li {
  background: rgba(38,132,255,0.05);
  padding: 0.5em 0.8em;
  border-radius: 6px;
  font-size: 0.9em;
  border-left: 3px solid var(--accent);
  transition: background 0.2s ease;
}
.coursework-list li:hover {
  background: rgba(38,132,255,0.08);
}
body.dark-mode .coursework-list li {
  background: rgba(96,168,250,0.08);
}
body.dark-mode .coursework-list li:hover {
  background: rgba(96,168,250,0.12);
}

.certifications-section {
  margin-top: 2.5em;
  padding-top: 2em;
  border-top: 1px solid rgba(38,132,255,0.1);
}
body.dark-mode .certifications-section {
  border-color: rgba(96,168,250,0.15);
}
.certifications-section h3 {
  margin-bottom: 1em;
  font-size: 1.15em;
  color: var(--accent);
}
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1em;
}
.certification-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.2em;
  background: linear-gradient(135deg, rgba(38,132,255,0.06), rgba(38,132,255,0.02));
  border: 1px solid rgba(38,132,255,0.1);
  border-radius: 10px;
  text-align: center;
  transition: all 0.3s ease;
}
.certification-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(38,132,255,0.15);
}
body.dark-mode .certification-badge {
  background: linear-gradient(135deg, rgba(96,168,250,0.08), rgba(96,168,250,0.03));
  border-color: rgba(96,168,250,0.12);
}
.cert-name {
  font-weight: 600;
  margin-bottom: 0.5em;
  font-size: 0.95em;
}
.cert-year {
  font-size: 0.85em;
  color: var(--accent);
  font-weight: 500;
}

/*─────────────────────────────────────────────────────────────────
  Experience Section
─────────────────────────────────────────────────────────────────*/
#experience article {
  margin-bottom: 1.6em;
}
#experience h3 {
  margin-bottom: 0.14em;
  font-size: 1.07em;
}
.duration {
  font-size: 0.96em;
  color: var(--accent);
  opacity: 0.9;
}

/*─────────────────────────────────────────────────────────────────
  Contact Section (SVG icons only)
─────────────────────────────────────────────────────────────────*/
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2em;
  margin-top: 2em;
  text-align: center;
}
.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6em;
}
.icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--btn-text);
  transition: filter 0.2s, box-shadow 0.2s;
}
.icon-circle svg {
  width: 24px;
  height: 24px;
  display: block;
}
.icon-circle:hover,
.icon-circle:focus {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px rgba(38,132,255,0.18);
}
.contact-label {
  font-size: 0.95em;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}
.contact-label:hover,
.contact-label:focus {
  color: var(--accent);
  outline: none;
}

/*─────────────────────────────────────────────────────────────────
  Responsive Styles
─────────────────────────────────────────────────────────────────*/
@media (max-width: 768px) {
  .education-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 600px) {
  main {
    padding: 1em 0.5em;
  }
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6em;
  }
  header h1 {
    font-size: 1.6em;
  }
  .icon-circle {
    width: 48px;
    height: 48px;
  }
  .icon-circle svg {
    width: 20px;
    height: 20px;
  }
  .contact-grid {
    gap: 1em;
  }
}
