:root {
  color-scheme: light;
  --bg: linear-gradient(180deg, #f8fbff 0%, #f7f7fb 100%);
  --surface: #ffffff;
  --surface-strong: #eef0f6;
  --text: #111827;
  --muted: #4b5563;
  --primary: #3341a8;
  --primary-soft: #e5e9ff;
  --accent: #1f6feb;
  --radius: 24px;
  --shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(51, 65, 168, 0.18);
}

.button--secondary {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid rgba(51, 65, 168, 0.16);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(247, 247, 251, 0.82);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.brand__name {
  font-size: 1.1rem;
  font-weight: 700;
}

.brand__tag {
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--primary);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 2.5rem;
  margin: 3rem 0 2rem;
}

.hero__content {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 4vw, 4.25rem);
  line-height: 1.05;
}

.hero__description {
  max-width: 44rem;
  margin: 1.5rem 0 2rem;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__visual {
  position: relative;
}

.card--highlight {
  padding: 2rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #eef2ff 100%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(99, 102, 241, 0.08);
}

.section {
  margin: 4rem 0;
}

.section__header {
  margin-bottom: 1.75rem;
}

.section__label {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
}

.section h2 {
  margin: 0;
  font-size: clamp(2rem, 2.5vw, 2.7rem);
}

.grid {
  display: grid;
  gap: 1.75rem;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats {
  display: grid;
  gap: 1rem;
}

.stat {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.stat span {
  display: block;
  font-size: 2rem;
  font-weight: 700;
}

.cards {
  display: grid;
  gap: 1.5rem;
}

.card {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.project-list {
  display: grid;
  gap: 1.5rem;
}

.project-card {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.project-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  color: var(--muted);
}

.theme-toggle {
  border: none;
  padding: 0.95rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.resume-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.75rem;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.4rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.timeline-item__date {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
}

.skills-card {
  padding: 1.75rem;
}

.skill-item {
  margin-top: 1rem;
}

.skill-item:first-child {
  margin-top: 0;
}

.skill-item span {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.skill-bar {
  height: 0.75rem;
  border-radius: 999px;
  background: rgba(51, 65, 168, 0.12);
  overflow: hidden;
}

.skill-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.project-card__button {
  margin-top: 1.5rem;
}

.project-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.project-modal.is-open {
  display: flex;
}

.project-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
}

.project-modal__panel {
  position: relative;
  max-width: 680px;
  width: min(90vw, 680px);
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  z-index: 1;
}

.project-modal__content {
  margin-bottom: 1.5rem;
}

.project-modal__content h3 {
  margin-top: 0;
}

.project-modal__role,
.project-modal__text {
  color: var(--muted);
}

.project-modal__meta {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
}

.project-modal__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: transparent;
  font-size: 1.75rem;
  color: var(--muted);
  cursor: pointer;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.contact-form label {
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: var(--surface-strong);
  color: var(--text);
}

.contact-details {
  display: grid;
  gap: 1rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.contact-details h3 {
  margin-top: 0;
}

.form-status {
  margin: 0;
  color: var(--muted);
  min-height: 1.5rem;
}

body.dark {
  background: #020617;
  color: #e2e8f0;
}

body.dark .site-header {
  background: rgba(10, 14, 33, 0.88);
}

body.dark .button--primary {
  background: #82aaff;
}

body.dark .button--secondary {
  background: #111827;
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.28);
}

body.dark .site-nav a,
body.dark .theme-toggle,
body.dark .brand__tag,
body.dark .section__label,
body.dark .project-modal__role,
body.dark .project-modal__text,
body.dark .project-modal__meta,
body.dark .form-status {
  color: #cbd5e1;
}

body.dark .card,
body.dark .project-card,
body.dark .skills-card,
body.dark .contact-form,
body.dark .contact-details,
body.dark .project-modal__panel,
body.dark .timeline-item {
  background: #0d1324;
  border-color: rgba(148, 163, 184, 0.1);
}

body.dark .contact-form input,
body.dark .contact-form textarea {
  background: #111827;
  border-color: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
}

body.dark a {
  color: #a5b4fc;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .page {
    padding: 1rem;
  }

  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}

.project-card__meta span {
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  margin-top: 3rem;
  padding-top: 1.5rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .page {
    padding: 1rem;
  }

  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}
