/* Import retro fonts */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=JetBrains+Mono:wght@400;700&display=swap');

/* CSS Custom Properties for retro theming */
:root {
  /* Light mode colors */
  --bg-primary: #f0f0f0;
  --bg-secondary: #e8e8e8;
  --bg-card: #ffffff;
  --text-primary: #2d1b69;
  --text-secondary: #2d1b69;
  --text-muted: #5a4a8a;
  --border-color: #2d1b69;
  --shadow: 0 4px 0 #2d1b69;
  --shadow-hover: 0 6px 0 #2d1b69;
  --primary: #2d1b69;
  --primary-hover: #1e1147;
  --primary-light: #e8e4f3;
  
  /* Layout */
  --container-max-width: 1200px;
  --section-padding: 2rem 0;
  --border-width: 3px;
  --transition: all 0.2s ease;
  
  /* Fonts */
  --font-header: 'Press Start 2P', monospace;
  --font-body: 'JetBrains Mono', monospace;
}

/* Dark theme variables and overrides */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #2d1b69;
    --bg-secondary: #1e1147;
    --bg-card: #3d2a5c;
    --text-primary: #f0f0f0;
    --text-secondary: #e8e8e8;
    --text-muted: #c0c0c0;
    --border-color: #f0f0f0;
    --shadow: 0 4px 0 #f0f0f0;
    --shadow-hover: 0 6px 0 #f0f0f0;
    --primary-light: #5a4a8a;
  }

  .icon { filter: invert(1); }
  .card::before { background: var(--text-primary); }
  .theme-toggle { background: var(--bg-card); color: var(--text-primary); }
  .tag { color: var(--text-primary); border-color: var(--text-primary); }
  .footer { color: var(--text-primary); }
  .footer-links a { color: var(--text-primary); }
  .section-title, .title { color: var(--text-primary); }
  .responsibilities li::before { color: var(--text-primary); }
  .period { background: var(--text-primary); color: var(--bg-primary); }
  
  .modal .btn-primary {
    background: #f0f0f0;
    color: #2d1b69;
    border-color: #2d1b69;
  }
  .modal .btn-primary:hover {
    background: #e8e8e8;
    border-color: #2d1b69;
  }
}

[data-theme="dark"] {
  --bg-primary: #2d1b69;
  --bg-secondary: #1e1147;
  --bg-card: #3d2a5c;
  --text-primary: #f0f0f0;
  --text-secondary: #e8e8e8;
  --text-muted: #c0c0c0;
  --border-color: #f0f0f0;
  --shadow: 0 4px 0 #f0f0f0;
  --shadow-hover: 0 6px 0 #f0f0f0;
  --primary-light: #5a4a8a;
}

[data-theme="dark"] .icon { filter: invert(1); }
[data-theme="dark"] .card::before { background: var(--text-primary); }
[data-theme="dark"] .theme-toggle { background: var(--bg-card); color: var(--text-primary); }
[data-theme="dark"] .tag { color: var(--text-primary); border-color: var(--text-primary); }
[data-theme="dark"] .footer { color: var(--text-primary); }
[data-theme="dark"] .footer-links a { color: var(--text-primary); }
[data-theme="dark"] .section-title, [data-theme="dark"] .title { color: var(--text-primary); }
[data-theme="dark"] .responsibilities li::before { color: var(--text-primary); }
[data-theme="dark"] .period { background: var(--text-primary); color: var(--bg-primary); }

[data-theme="dark"] .modal .btn-primary {
  background: #f0f0f0;
  color: #2d1b69;
  border-color: #2d1b69;
}
[data-theme="dark"] .modal .btn-primary:hover {
  background: #e8e8e8;
  border-color: #2d1b69;
}

[data-theme="light"] {
  --bg-primary: #f0f0f0;
  --bg-secondary: #e8e8e8;
  --bg-card: #ffffff;
  --text-primary: #2d1b69;
  --text-secondary: #2d1b69;
  --text-muted: #5a4a8a;
  --border-color: #2d1b69;
  --shadow: 0 4px 0 #2d1b69;
  --shadow-hover: 0 6px 0 #2d1b69;
  --primary-light: #e8e4f3;
}

[data-theme="light"] .icon { filter: none; }
[data-theme="light"] .modal .btn-primary {
  background: #2d1b69;
  color: #f0f0f0;
  border-color: #f0f0f0;
}
[data-theme="light"] .modal .btn-primary:hover {
  background: #1e1147;
  border-color: #f0f0f0;
}

@media (prefers-color-scheme: light) {
  .icon { filter: none; }
  .modal .btn-primary {
    background: #2d1b69;
    color: #f0f0f0;
    border-color: #f0f0f0;
  }
  .modal .btn-primary:hover {
    background: #1e1147;
    border-color: #f0f0f0;
  }
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  line-height: 1.4;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: var(--transition);
  font-size: 14px;
  margin-top: 80px;
}

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

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

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 1000;
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-color);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
  font-size: 1rem;
  color: var(--text-primary);
}

.theme-toggle:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.theme-toggle:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--border-color);
}

/* Header */
.header {
  padding: var(--section-padding);
  background: var(--bg-primary);
  border-bottom: var(--border-width) solid var(--border-color);
  text-align: center;
  position: relative;
}

.header::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-color);
}

.name {
  font-family: var(--font-header);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 400;
  margin-bottom: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  z-index: 9999;
  padding: 1rem 0;
  border-bottom: var(--border-width) solid var(--border-color);
  box-shadow: var(--shadow);
  text-align: center;
}

.title {
  font-family: var(--font-header);
  font-size: clamp(0.8rem, 2vw, 1rem);
  color: var(--primary);
  font-weight: 400;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.summary {
  max-width: 800px;
  margin: 0 auto 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: left;
  background: var(--bg-card);
  padding: 1.5rem;
  border: var(--border-width) solid var(--border-color);
  box-shadow: var(--shadow);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition);
  cursor: pointer;
  border: var(--border-width) solid var(--border-color);
  font-size: 1rem;
  white-space: nowrap;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg-primary);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--border-color);
}

.btn-outline {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow);
}

.btn-outline:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-outline:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--border-color);
}

/* Sections */
.section {
  padding: var(--section-padding);
  background: var(--bg-primary);
  position: relative;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-alt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--border-width);
  background: var(--border-color);
}

.section-title {
  font-family: var(--font-header);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 400;
  margin-bottom: 2rem;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-color);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border: 2px solid var(--border-color);
}

.card h3 {
  font-family: var(--font-header);
  font-size: 0.8rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--text-primary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.card p {
  margin-bottom: 1.5rem;
  line-height: 1.4;
  flex-grow: 1;
  font-size: 0.85rem;
}

.card .location {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  justify-content: flex-start;
  font-size: 0.8rem;
}

/* Experience Cards */
.card.experience-card {
  margin-bottom: 1.5rem;
}

.card.experience-card:hover {
  transform: translateY(-2px);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 1rem;
  position: relative;
}

.experience-header h3 {
  font-family: var(--font-header);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.period {
  color: var(--bg-primary);
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.8rem;
  background: var(--primary);
  padding: 0.25rem 0.5rem;
  border: 2px solid var(--border-color);
  position: absolute;
  top: -1.5rem;
  right: -1.5rem;
}

.responsibilities {
  list-style: none;
  padding: 0;
}

.responsibilities li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  font-size: 0.85rem;
}

.responsibilities li::before {
  content: '■';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Skills and Projects */
.skills-grid, .projects-grid {
  display: grid;
  gap: 1.5rem;
}

.skills-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.projects-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-header h3 {
  font-family: var(--font-header);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 1px;
}

.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Education */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 3rem;
  align-items: stretch;
}

.education-section {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.education-section h3 {
  font-family: var(--font-header);
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  padding-bottom: 0.5rem;
  border-bottom: var(--border-width) solid var(--border-color);
}

.card.education-card {
  margin-bottom: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 1rem;
  position: relative;
}

.education-header h4 {
  font-family: var(--font-header);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.institution {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 0.8rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(45, 27, 105, 0.8);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-color);
  box-shadow: var(--shadow-hover);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border: 2px solid var(--border-color);
  z-index: -1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: var(--border-width) solid var(--border-color);
}

.modal-header h3 {
  font-family: var(--font-header);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 1px;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--primary);
  color: var(--bg-primary);
}

.modal-close img {
  width: 32px;
  height: 32px;
}

/* Contact Form */
.contact-form {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: var(--border-width) solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition);
  font-family: var(--font-body);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.btn-loading {
  display: none;
}

/* Footer */
.footer {
  background: var(--primary);
  color: var(--bg-primary);
  padding: 2rem 0;
  text-align: center;
  border-top: var(--border-width) solid var(--border-color);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-color);
}

.footer-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--bg-primary);
  text-decoration: none;
  transition: var(--transition);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links a:hover {
  opacity: 0.8;
}

/* Icons */
.icon {
  width: 1.5em;
  height: 1.5em;
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

/* Links */
.company-link,
.institution-link {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.company-link:hover,
.institution-link:hover {
  color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --section-padding: 1.5rem 0;
  }
  
  body {
    font-size: 13px;
  }
  
  .summary {
    text-align: center;
    font-size: 0.8rem;
  }
  
  .actions {
    flex-direction: column;
  }
  
  .experience-header, .education-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .period {
    position: static;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    margin-top: 0;
  }
  
  .period[data-full]::after {
    content: attr(data-short);
    font-size: 0.8rem;
  }
  
  .period[data-full] {
    font-size: 0;
  }
  
  .projects-grid, .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .education-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 12px;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .theme-toggle {
    width: 44px;
    height: 44px;
  }
  
  .form-actions {
    flex-direction: column;
  }
}

/* Print Styles */
@media print {
  .theme-toggle,
  .modal,
  .footer {
    display: none !important;
  }
  
  .section,
  .card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
} 