/* ----------------------
   Core Reset & Base
   ---------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f5f8fb;
  color: #333;
  line-height: 1.5;
}

/* design tokens so early rules can reference variables */
:root {
  /* forest green palette */
  --accent: #0b5d3a;        /* primary forest green */
  --accent-2: #2a8a5a;      /* lighter green for hovers */
  --header-grad-1: #083b2b; /* deep green for top of header gradient */
  --header-grad-2: #1e6e4d; /* brighter green for bottom of header gradient */
  --card-bg: #ffffff;
  --glass: rgba(255,255,255,0.92);
}

/* ----------------------
   Header & Nav
   ---------------------- */
header {
  text-align: center;
  /* further reduce vertical padding to bring main closer */
  padding: 10px 16px;
}

header.hero {
  /* keep small padding but add gradient background and center content */
  padding: 10px 16px;
  background: linear-gradient(180deg, var(--header-grad-1), var(--header-grad-2));
  color: #fff;
  position: relative;
  overflow: visible;
  -webkit-font-smoothing: antialiased;
}

header h1 {
  font-size: 1.8rem;
  /* even smaller gap under the title */
  margin-bottom: 2px;
}

header p {
  color: #444;
  /* slightly smaller gap under the subtitle */
  margin-bottom: 6px;
}

nav {
  margin-top: 8px;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

nav a:hover {
  color: var(--accent-2);
}

/* ----------------------
   Main container
   ---------------------- */
main {
  /* further reduce top padding so main sits closer under header */
  padding: 8px 16px;
  max-width: 1100px; /* slightly wider for project images */
  margin: 0 auto;
}

/* ----------------------
   Profile / About styling
   ---------------------- */
.profile-details {
  text-align: center;
  /* reduce top padding so first section is closer to header */
  padding: 12px;
}

.profile-details h2 {
  /* reduce large top spacing for section headings */
  margin-top: 16px;
  margin-bottom: 12px;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.profile-details p {
  margin: 10px 0;
  line-height: 1.6;
}

.profile-details ul {
  list-style-position: inside;
  text-align: center;
  padding: 0;
  margin: 12px 0 28px 0;
}

.profile-details li {
  margin: 6px 0;
}


.profile-photo-large {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
  /* tighten space beneath photo */
  margin: 0 auto 12px;
  display: block;
}

header.hero .profile-photo-large {
  /* white-ish ring to stand out on gradient */
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  border: 4px solid rgba(255,255,255,0.9);
  margin-bottom: 10px;
}

/* paragraph spacing in About */
.about-section p {
  margin: 15px 0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* ----------------------
   List styling (centered)
   ---------------------- */
.about-section ul,
.additional-links ul {
  list-style: none;
  padding: 0;
  margin-top: 10px;
  text-align: center;
}

.about-section li,
.additional-links li {
  margin: 8px 0;
}

/* ----------------------
   Additional Links / Social
   ---------------------- */
.additional-links {
  text-align: center;
  margin-top: 20px;
}

.additional-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.additional-links a:hover {
  color: var(--accent-2);
}

.social-media {
  text-align: center;
  margin-top: 20px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 18px;
  align-items: center;
}

.social-icon {
  width: 56px;
  height: 56px;
  transition: transform 0.18s ease;
}

.social-icon:hover {
  transform: scale(1.06);
}

/* ----------------------
   Buttons
   ---------------------- */
.btn {
  display: inline-block;
  padding: 10px 16px;
  background-color: var(--accent);
  color: white;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.18s ease, transform 0.12s ease;
  cursor: pointer;
}

.btn.cta {
  display: inline-block;
  padding: 10px 18px;
  background: linear-gradient(90deg, var(--header-grad-1), var(--header-grad-2));
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(11,93,58,0.14);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  background-color: var(--accent-2);
  transform: translateY(-2px);
}

.btn.cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(11,93,58,0.16);
}

/* Footer */
footer {
  text-align: center;
  padding: 16px;
  background-color: var(--accent);
  color: #fff;
  margin-top: 30px;
  font-size: 0.9em;
}

/* ----------------------
   ===== PROJECTS ======
   Card layout for projects page
   ---------------------- */
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  padding: 18px;
  margin-bottom: 22px;
  overflow: hidden;
}

/* Project title (keeps consistent spacing) */
.card h2 {
  font-size: 1.25rem;
  margin: 12px 0;
  color: #222;
}

/* Main photo used on projects page */
.main-photo {
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  margin: 0 auto 12px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

/* Project descriptive paragraphs inside cards */
.card p {
  margin: 10px 0;
  color: #333;
  font-size: 0.98rem;
  line-height: 1.6;
}

/* inline links in project descriptions */
.card a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 600;
}

/* Make embedded PDFs responsive and constrained */
.card iframe {
  width: 100%;
  max-width: 900px;
  height: 480px;
  border: 1px solid #ddd;
  border-radius: 6px;
  display: block;
  margin: 12px auto;
}

/* Small helper: project source link style when shown after card */
.card > a.project-source {
  display:block;
  margin-top:8px;
  color: var(--accent);
  font-size:0.95rem;
}

/* ----------------------
   Project preview (main page)
   ---------------------- */
.project-preview {
  max-width: 900px;
  /* bring previews slightly closer to preceding content */
  margin: 12px auto 30px auto;
  line-height: 1.6;
}

.project-preview p {
  margin-bottom: 1.75rem;
}


/* ----------------------
   Responsive rules
   ---------------------- */
@media screen and (max-width: 900px) {
  /* keep responsive spacing consistent with the reduced desktop spacing */
  main {
    padding: 8px;
  }

  header.hero h1 { font-size: 1.5rem; }
  .header-wave svg { height: 36px; }
  .profile-details { padding: 12px; }
}

@media screen and (max-width: 600px) {
  header.hero { padding: 8px 12px; }
  .header-wave svg { height: 28px; }
  .profile-details { padding: 10px; }
}

/* Hero header visual upgrade */
header.hero {
  /* keep small padding but add gradient background and center content */
  padding: 10px 16px;
  background: linear-gradient(180deg, var(--header-grad-1), var(--header-grad-2));
  color: #fff;
  position: relative;
  overflow: visible;
  -webkit-font-smoothing: antialiased;
}

header.hero .profile-photo-large {
  /* white-ish ring to stand out on gradient */
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  border: 4px solid rgba(255,255,255,0.9);
  margin-bottom: 10px;
}

/* brighten header text and small shadow for readability */
header.hero h1,
header.hero p {
  color: #fff;
  text-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

/* decorative underline for the H1 */
header.hero h1::after {
  content: '';
  display: block;
  width: 54px;
  height: 3px;
  margin: 8px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.92), rgba(255,255,255,0.7));
  opacity: 0.95;
}

/* SVG wave divider sizing */
.header-wave {
  display: block;
  line-height: 0;
  margin-bottom: -2px; /* overlaps slightly to reduce perceived gap */
}
.header-wave svg {
  display:block;
  width:100%;
  height:48px;
}

/* Make the profile/details area read like a card over the page */
.profile-details {
  background: var(--glass);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(20,30,60,0.06);
  padding: 14px 18px;
  margin-top: 8px; /* small gap to the wave */
}

/* CTA button style */
.btn.cta {
  display: inline-block;
  padding: 10px 18px;
  background: linear-gradient(90deg, var(--header-grad-1), var(--header-grad-2));
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(11,93,58,0.14);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.btn.cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(11,93,58,0.16);
}

/* subtle fade-in utility for sections */
.animate-fade {
  animation: fadeIn 560ms cubic-bezier(.2,.8,.2,1) both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* apply fade to profile block and cards for nicer entrance */
.profile-details, .card {
  will-change: transform, opacity;
}
