/* Global Styles */
body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  background: #fff;
  color: #222;
}

html, body {
  height: 100%;
  margin: 0; /* ensure scroll only when needed */
}

h1, h2, h3, h4, h5, h6 {
  text-align: left;       /* all headers flush left */
  font-size: 2.25rem;   /* large main heading */
}

a {
  color: #0077cc;
  text-decoration: none;
}

.container {
  max-width: 650px;
  margin: 0 auto;
  padding: 1rem;
}

section .container {
  margin-top: 50px;       /* offset to avoid overlap with fixed header */
}

.page-wrapper {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  height: auto;
}

.page-wrapper .container {
  flex: 1 0 auto;
}

.page-wrapper > *:not(.footer) {
  flex: 1 0 auto;         /* natural content height */
}

.page-wrapper > section {
  padding-top: 30px; /* or slightly more if you want extra breathing room */
}

.page-wrapper > .container:last-child {
  margin-bottom: 1rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #eee;
  z-index: 1000;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #eee;
  z-index: 1000;
}

.header .container {
  display: flex;
  align-items: center;         
  justify-content: space-between;
  padding: 20px;
}

.header .name {
  margin: 0;
  font-size: 1.5rem;
}

.header .nav a {
  color: #000;
  margin-left: 1rem;
  font-weight: 400;
}

/* Hero Section */
.hero {
  text-align: leftle;
  padding: 5rem 1rem;
  background: #f5f5f5;
  border-radius: 10px;
  margin: 2rem auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.1rem;
}

.about,
.work,
.contact {
  padding: 1.5rem 1rem;
}

.about .container,
.work .container,
.contact .container {
  text-align: left;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.project-card {
  border: 1px solid #ddd;
  padding: 1rem;
  border-radius: 8px;
  background: #fafafa;
  transition: transform 0.2s;
}

.project-card:hover {
  transform: translateY(-5px);
}

/* Footer */

.footer {
  flex-shrink: 0; /* keep footer at bottom if content is short */
  width: 100%;
  height: 60px;
  background: #f1f1f1;

}

/* Responsive */
@media (max-width: 600px) {
  .header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .header .nav {
    margin-top: 0.5rem;
  }

  .header .nav a {
    margin-left: 0;
    margin-right: 1rem;
  }
}

/* Text boxes */
.contact input[type="text"],
.contact input[type="email"] {
  width: 500px;       /* makes the input span full container width */
  max-width: 500px;  /* optional maximum width */
  padding: 0.5rem;   /* internal spacing */
  font-size: 1rem;
  box-sizing: border-box; /* ensures padding doesn't break width */
  resize: vertical;
}

/* Textarea */
.contact textarea {
  width: 500px;
  max-width: 500px;
  height: 200px;     /* sets the height explicitly */
  padding: 0.5rem;
  font-size: 1rem;
  box-sizing: border-box;
  resize: vertical;
}

.publication {
  margin-bottom: 2.5rem;
}

.publication p {
  margin: 0.3rem 0;
}

.btn {
  all: unset;                 /* nuclear reset */
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1;

  background: #eeeeee;
  color: #222;
  border: 1px solid #ccc;

  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: #dddddd;
}

.publication {
  max-width: 500px;
}

.lead {
  font-size: 1.15rem;   /* adjust if you want it bigger/smaller */
  line-height: 1.5;
}

p, .lead {
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.5;      /* consistent with other text */
}

p:last-child {
  margin-bottom: 0;  /* reduces gap above footer */
}

.cv {
  /* just natural height, no flex here */
  padding: 50px 0; /* optional spacing */
}

.cv embed {
  width: 90%;             /* PDF takes x% of page width */
  max-width: 800px;       /* caps at 800px wide on large screens */
  height: auto;           /* height adjusts to maintain PDF ratio */
  aspect-ratio: 210 / 297; /* ensures A4 proportions */
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  border: 1px solid #ccc;
  display: block;
  margin: 30px auto;      /* centers PDF */
}
