/* ========================================
   Global styles
   ======================================== */

:root {
  --color-accent: #3b82f6;
  --color-accent-dark: #2563eb;
  --color-text: #222;
  --color-muted: #555;
  --color-border: #e5e7eb;
  --color-surface: #fff;
  --color-page: #f9fafb;

  accent-color: var(--color-accent);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  max-width: 100ch;
  margin-inline: auto;
  padding-inline: 1em;
  font: 100%/1.5 system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--color-text);
  background: var(--color-page);
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.1;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  margin-bottom: 0.75em;
}

p {
  line-height: 1.6;
}

a {
  overflow-wrap: anywhere;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ========================================
   Navigation
   ======================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25em 0.5em;
  margin-bottom: 1.5em;
  padding: 0.75em 1em 0;
  background: var(--color-surface);
  border-bottom: 1px solid #d1d5db;
}

.nav a {
  flex: 1 1 auto;
  padding: 0.5em 0.65em 0.4em;
  border-bottom: 0.3em solid transparent;
  color: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav a:hover,
.nav a[aria-current="page"],
.nav a.current {
  color: var(--color-accent-dark);
  border-bottom-color: var(--color-accent);
}

/* ========================================
   Main page sections and header
   ======================================== */

section {
  max-width: 900px;
  margin-inline: auto;
  padding: 2.5em 1.25em;
}

.header {
  padding: 2.5em 1.25em 1.25em;
  text-align: center;
}

.header p {
  color: var(--color-muted);
  font-size: 1.1rem;
}

.profile-img {
  width: 180px;
  max-width: 60vw;
  margin-top: 1.25em;
  border-radius: 50%;
  object-fit: cover;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.25em;
  margin-top: 1.25em;
}

.social-links img {
  width: 32px;
  height: 32px;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.social-links img:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.quick-links a {
  display: inline-block;
  margin: 0.6em 1em 0 0;
  color: var(--color-accent-dark);
  font-weight: 600;
  text-decoration: none;
}

.quick-links a:hover {
  text-decoration: underline;
}

footer {
  padding: 2.5em 1em;
  color: #777;
  font-size: 0.9rem;
  text-align: center;
}

/* ========================================
   Contact page
   ======================================== */

.contact-page main {
  max-width: 800px;
  margin-inline: auto;
}

.contact-page section {
  max-width: 720px;
  padding: 2.5em 1.25em;
}

.contact-page h1 {
  margin: 0 0 0.4em;
  font-size: clamp(2rem, 5vw, 2.5rem);
}

.contact-page h2 {
  margin: 0 0 1.25em;
  font-size: 1.25rem;
}

.contact-page .contact-box {
  margin-top: 1.5em;
  padding: 1.75em;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
}

.contact-page form {
  display: grid;
  gap: 1em;
}

.contact-page label {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5em;
  font-size: 0.95rem;
  font-weight: 600;
}

.contact-page input,
.contact-page textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0.75em;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--color-text);
  font: inherit;
  font-weight: 400;
}

.contact-page textarea {
  resize: vertical;
}

.contact-page input:focus,
.contact-page textarea:focus {
  outline: 2px solid var(--color-accent-dark);
  outline-offset: 2px;
}

.contact-page button {
  justify-self: start;
  padding: 0.75em 1.25em;
  border: 0;
  border-radius: 8px;
  background: var(--color-accent-dark);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.contact-page button:hover {
  background: #1d4ed8;
}

.contact-page a {
  color: var(--color-accent-dark);
}

.contact-page .form-note {
  margin: 0;
  color: #64748b;
  font-size: 0.8125rem;
}

/* ========================================
   Projects page
   ======================================== */

.projects-page {
  max-width: none;
  margin: 0;
  padding: 0;
}

.projects-page main {
  max-width: 1100px;
  margin-inline: auto;
  padding: 2.75em 1.5em;
}

.projects-page h1 {
  margin: 0 0 0.4em;
  font-size: clamp(2rem, 5vw, 2.5rem);
}

.projects-page .intro {
  max-width: 760px;
  margin: 0;
  color: var(--color-muted);
  line-height: 1.7;
}

.projects-page .projects-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(min(100%, 15em), 1fr)
  );
  align-items: stretch;
  gap: 1.5em;
  margin-top: 2em;
}

.projects-page .project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.5em;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgb(0 0 0 / 4%);
}

.projects-page .project-card img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1.25em;
  border-radius: 10px;
}

.projects-page .project-card h2 {
  margin: 0 0 0.65em;
  color: #111827;
  font-size: 1.375rem;
  line-height: 1.25;
}

.projects-page .project-card h3 {
  margin: 1.5em 0 0.5em;
  color: #111827;
  font-size: 1rem;
}

.projects-page .project-card p {
  margin: 0 0 0.875em;
  line-height: 1.7;
}

.projects-page .project-card ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.projects-page .project-card li {
  margin-bottom: 0.5em;
}

.projects-page .project-card .tools {
  margin-top: auto;
  padding-top: 1em;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.875rem;
}

.projects-page .project-link {
  display: inline-block;
  align-self: flex-start;
  margin-top: 0.25em;
  color: var(--color-accent-dark);
  font-weight: 600;
  text-decoration: none;
}

.projects-page .project-link:hover {
  text-decoration: underline;
}

/* ========================================
   Responsive adjustments
   ======================================== */

@media (max-width: 600px) {
  .nav {
    gap: 0.15em;
    padding-inline: 0.25em;
  }

  .nav a {
    flex: 1 1 28%;
    padding-inline: 0.25em;
    font-size: 0.9rem;
    white-space: normal;
  }

  section {
    padding: 2em 0.5em;
  }

  .contact-page section {
    padding: 2em 0.5em;
  }

  .contact-page .contact-box {
    padding: 1.25em;
  }

  .projects-page main {
    padding: 2em 1em;
  }

  .projects-page .project-card {
    padding: 1.25em;
  }
}


/* ===== Resume Page ===== */

.resume-page {
  --color-accent: #2563eb;
  background: #f9fafb;
}

.resume-page main {
  max-width: 900px;
  margin-inline: auto;
  padding: 32px 24px 60px;
}

/* Resume Header */

.resume-page .header {
  padding: 32px 20px;
  text-align: center;
}

.resume-page .header h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.2;
  text-wrap: balance;
  margin: 0 0 12px;
}

.resume-page .header p {
  margin: 8px 0;
}

/* Resume Sections */

.resume-page section {
  max-width: none;
  padding: 28px 0;
  border-bottom: 1px solid #e5e7eb;
}

.resume-page section h2 {
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-accent);
  color: #1e293b;
  font-size: 1.5rem;
  line-height: 1.2;
  text-wrap: balance;
}

/* Experience and Education Entries */

.resume-page article {
  padding: 18px 22px;
  margin-bottom: 18px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.resume-page article h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 1.15rem;
  line-height: 1.3;
  text-wrap: balance;
}

.resume-page article p {
  margin: 6px 0 12px;
  color: #64748b;
}

.resume-page ul {
  padding-left: 22px;
  line-height: 1.7;
}

.resume-page li {
  margin-bottom: 8px;
}

/* Links and Navigation */

.resume-page a {
  color: var(--color-accent);
}

.resume-page .nav a {
  color: #333;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.resume-page .nav a:hover,
.resume-page .nav a[aria-current="page"] {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* Responsive Design */

@media (max-width: 600px) {
  .resume-page main {
    padding: 20px 16px 40px;
  }

  .resume-page section {
    padding: 20px 0;
  }

  .resume-page article {
    padding: 16px;
  }
}

