/* Portfolio styling */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --primary: #1f3a8a;
  --primary-dark: #1e3a8a;
  --primary-light: #e0e7ff;
  --secondary: #475569;
  --accent: #0ea5e9;
  --accent-dark: #0369a1;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #eef2ff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 6px 16px rgba(15, 23, 42, 0.04);
  --shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.1);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
}

#darkModeToggle {
  position: fixed;
  top: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  z-index: 1000;
}

#darkModeToggle:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

@media (max-width: 768px) {
  #darkModeToggle {
    top: 20px;
    right: 20px;
  }
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0;
  background: var(--bg-secondary);
}

.profile-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 56px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  max-width: 720px;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.profile-img {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 28px;
  border: 3px solid var(--border);
}

h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.subtitle {
  font-size: 1.4rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-weight: 500;
}

.tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.cv-button {
  display: inline-block;
  background: var(--primary);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  box-shadow: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 36px;
}

.cv-button:hover,
.cv-button:focus {
  background: var(--primary-dark);
  box-shadow: 0 14px 24px rgba(31, 58, 138, 0.25);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-primary);
  border-radius: 50%;
  border: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.social-icons a:hover,
.social-icons a:focus {
  border-color: var(--primary);
  background: var(--primary-light);
}

.social-icons img {
  width: 22px;
  height: 22px;
  filter: grayscale(1);
  transition: filter 0.2s ease;
}

.social-icons a:hover img,
.social-icons a:focus img {
  filter: none;
}

nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  font-size: 0.95rem;
  letter-spacing: 0.015em;
}

nav a:hover,
nav a:focus {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

@media (max-width: 768px) {
  nav {
    gap: 12px;
  }
}

main {
  padding: 100px 0;
  background: var(--bg-secondary);
}

.section-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 56px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.section-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.section-card h2 {
  font-size: 2.3rem;
  margin-bottom: 40px;
  color: var(--text-primary);
  font-weight: 600;
  text-align: center;
  position: relative;
}

.section-card h2::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.about-text p {
  margin-bottom: 20px;
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 1.05rem;
  text-align: left;
}

.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 42px;
}

.timeline-marker {
  position: absolute;
  left: -26px;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
}

.timeline-content {
  background: var(--bg-primary);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.timeline-content:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.timeline-content h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

.company {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  font-size: 1rem;
}

.timeline-content p {
  text-align: left;
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.timeline-content p:last-child {
  margin-bottom: 0;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tech-tags span {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.tech-tags span:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.skills-categories {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.skill-category h3 {
  font-size: 1.45rem;
  margin-bottom: 24px;
  color: var(--text-primary);
  font-weight: 600;
  text-align: center;
  position: relative;
}

.skill-category h3::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.skill:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.skill img {
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  filter: grayscale(1);
  transition: filter 0.2s ease;
}

.skill:hover img {
  filter: none;
}

.skill span {
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.3;
}

.project-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn:focus,
.filter-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 28px;
  margin-top: 40px;
}

.project-list {
  list-style: none;
}

.project-list li {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-list li:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.project-list a {
  display: block;
  padding: 28px;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 12px;
}

.project-badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

.project-list strong {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 14px;
  color: var(--text-primary);
  font-weight: 600;
}

.project-desc {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.7;
  font-size: 0.98rem;
  text-align: left;
}

.project-tech {
  display: block;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 18px;
}

.project-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.contact-content {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 992px) {
  .contact-content {
    grid-template-columns: 1fr;
  }
}

.contact-info h3 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: var(--text-primary);
  font-weight: 600;
  text-align: left;
}

.contact-info p {
  margin-bottom: 32px;
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 1.05rem;
  text-align: left;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.contact-method:hover {
  border-color: var(--primary);
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
}

.contact-icon {
  font-size: 1.5rem;
  color: var(--primary);
}

.contact-method strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 1rem;
}

.contact-method p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contact-form {
  background: var(--bg-primary);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 58, 138, 0.12);
}

.submit-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  font-size: 0.95rem;
}

.submit-btn:hover,
.submit-btn:focus {
  background: var(--primary-dark);
  box-shadow: 0 12px 24px rgba(31, 58, 138, 0.2);
}

.form-status {
  min-height: 1.2em;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-status.success {
  color: #0f766e;
}

.form-status.error {
  color: #b91c1c;
}

footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 64px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  margin-bottom: 24px;
}

.footer-section h4 {
  color: var(--text-primary);
  margin-bottom: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.9rem;
  text-align: left;
}

.footer-section a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 6px;
  transition: color 0.2s ease;
  font-weight: 500;
  font-size: 0.9rem;
}

.footer-section a:hover,
.footer-section a:focus {
  color: var(--primary);
}

.footer-social {
  display: flex;
  gap: 14px;
}

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

.footer-bottom p {
  margin-bottom: 4px;
}

@media (max-width: 768px) {
  .profile-card {
    padding: 36px 24px;
  }

  h1 {
    font-size: 2.2rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .social-icons {
    gap: 14px;
  }

  .section-card {
    padding: 40px 24px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .contact-content {
    gap: 32px;
  }

  nav {
    gap: 8px;
  }
}

body.dark-mode {
  --text-primary: #f8fafc;
  --text-secondary: #cbd5f5;
  --text-muted: #a5b4fc;
  --bg-primary: #0f172a;
  --bg-secondary: #111c34;
  --bg-tertiary: #1e293b;
  --border: #1e293b;
  --border-light: #273449;
  --shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.4);
  --shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
}
