/* variables & reset */
:root {
  --primary: #4A90E2;
  --bg: #EAF4FF;
  --fg: #333;
  --muted: #666;
  --radius: 8px;
  --transition: 0.3s ease;
}
* {
  margin: 0; padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

#page-tagline {
  font-size: 1rem;
  color: var(--muted);
  margin-top: -0.5rem;
  margin-bottom: 0;
  font-style: italic;
}

@media (max-width: 600px) {
  #page-tagline {
    font-size: 0.9rem;
    line-height: 1.3;
    text-align: center;
    padding: 0 1rem;
  }
}
@media (max-width: 600px) {
  .title-group {
    align-items: center;
    text-align: center;
  }
}

/* 1) Make the header itself white across the entire viewport */
header {
  background-color: white;    /* instead of putting this on .container */
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: relative;
  z-index: 10;
}

/* 2) Constrain only the inner .container to your max‑width */
header .container {
  max-width: 960px;            /* or whatever you prefer */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}
.title-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

#page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.25rem;
}
#page-title {
  flex: 0 0 auto;     /* don’t grow or shrink */
  margin: 0;           /* no extra bottom margin */
}

#page-tagline {
  font-size: 1rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0;
}


nav {
  flex: 0 1 auto;      /* take only as much space as needed */
}

nav ul {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;    /* keep everything on one line */
  list-style: none;
  padding: 0;
  margin: 0;
}

/* bullets between items */
nav li + li::before {
  content: "•";
  color: var(--muted);
  margin: 0 0.5rem;
}

.nav-btn {
  background: transparent;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.nav-btn:hover {
  background: rgba(74,144,226,0.1);
  color: var(--primary);
}
.nav-btn.active {
  color: var(--primary);
  background: rgba(74,144,226,0.15);
}

@media (max-width: 700px) {
  nav ul {
    display: flex;
    flex-wrap: wrap; /* allow wrapping */
    justify-content: center;
    gap: 0.5rem;
  }

  nav li + li::before {
    display: none; /* remove the bullet separators */
  }

  .nav-btn {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }

  header .container {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
}


/* tab handling */
.tab { display: none; }
.tab.active { display: block; }

/* home */
.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
}
.home-intro {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
  text-align: center;
  max-width: 700px;
}
.slideshow-container {
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.slide {
  width: 100%;
  display: none;
  object-fit: cover;
}
.slideshow-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.slideshow-buttons button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.slideshow-buttons button:hover {
  background: #357ABD;
}

.slideshow-buttons button i.fa-instagram {
  color: #E4405F;  /* Instagram's signature pinkish-red tone */
}

/* experiences timeline */
.timeline {
  margin-top: 2rem;
  display: grid;
  gap: 2rem;
}
.timeline-entry {
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}
.timeline-logo {
  width: 60px;
  height: auto;
}
.timeline-logo {
  display: none;
}
.timeline-date {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 600;
}
.read-more-btn {
  grid-column: 1 / -1;
  justify-self: end;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.read-more-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-embed {
  text-align: center;
  margin-bottom: 1rem;
}
.modal-embed iframe {
  width: 100%;
  max-width: 100%;
  height: 402px;
}

.skills-line {
  margin-top: 0;
  font-style: italic;
  color: #444;
}


/* about */
.about-content {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-top: 2rem;
}

.photo-wrapper {
  position: relative;
  width: 350px;       /* width of your profile image */
  flex-shrink: 0;
  overflow: visible
}

.about-photo {
  width: 100%;
  height: auto;
  border-radius: var(--radius);      /* same radius as your theme */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.about-logo {
  position: absolute;
  top: 10px;            /* aligns top of seal with top of photo */
  left: 10px;      /* shifts the seal left so it overlaps */
  width: 125px;      /* tweak to taste */
  height: auto;
  z-index: 2;
}

.about-right {
  flex: 1;
}

.about-bio {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;   /* turns each newline in your text file into a <br> */
}

.nav-btn i,
.slideshow-buttons button i {
  margin-right: 0.5rem;
  font-size: 1.1em;
}

/* Inline project boxes under each experience */
.project-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.project-box {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  text-align: center;
}

.project-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 0.5rem 0;
}

.project-read-more-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}

.project-read-more-btn:hover {
  background: #357abd;
}


.blackjack-video-wrapper {
  overflow: hidden;
  height: 447px;   /* trim the black bottom edge */
}

.blackjack-video-wrapper video {
  transform: scale(0.5);
  transform-origin: top center;
  display: block;
  margin: 0 auto;
}

.notebook-viewer {
  text-align: center;
  margin-top: 1rem;
}

.notebook-viewer img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#notebook-image {
  width: 65%;
  max-width: 800px;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}


.notebook-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.notebook-controls button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition);
}

.notebook-controls button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#page-counter {
  font-weight: 600;
  color: var(--fg);
}


/* ===== Essays Section ===== */

#essays {
  margin-top: 2rem;
}

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

.essay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  justify-items: center;
  align-items: start;
  margin-top: 1.5rem;
}

.essay-card {
  width: 100%;
  max-width: 420px;  /* keeps consistent card size */
  background: #fff;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition), box-shadow var(--transition);
}


.essay-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.essay-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}


.essay-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-align: left;
}

.essay-card h3 {
  margin-bottom: 0.4rem;
  color: var(--primary);
  font-size: 1.05rem;
}

.essay-tagline {
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.essay-card p {
  color: var(--muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.essay-btn {
  align-self: flex-start;
  margin-top: 0.75rem;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: background var(--transition);
}

.essay-btn:hover {
  background: #357ABD;
}

/* ===== About / Hero Section ===== */
.intro-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;        /* ✅ centers photo + text vertically */
  justify-content: space-between;
  gap: 2rem;
  margin: 2rem 0;
}


.intro-text {
  flex: 1 1 350px;
}

.intro-text h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

/* Force the profile photo to display and stay visible */
.intro-photo {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: block;              /* ✅ ensure it’s rendered */
  flex-shrink: 0;              /* ✅ prevent it from collapsing */
  background-color: #eee;      /* ✅ fallback to verify visibility */
}

.intro-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;     /* ✅ adds breathing room below the paragraph */
  justify-content: flex-start;  /* ✅ aligns nicely under text */
  flex-wrap: wrap;         /* ✅ prevents squishing on smaller screens */
}

.intro-buttons button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.7rem 1.5rem;  /* ✅ slightly larger buttons for balance */
  border-radius: 12px;     /* ✅ softer, more modern look */
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}

.intro-buttons button:hover {
  background: #357abd;
  transform: translateY(-2px);  /* ✅ subtle lift on hover */
}


/* Instagram accent color */
.intro-buttons button i.fa-instagram {
  color: #E4405F; /* Instagram’s signature tone */
}

.about-bio {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  white-space: pre-wrap;
}

/* ===== PDF Modal ===== */
#pdf-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 1001;
}

.pdf-modal-content {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 90%;
  max-width: 1000px;          /* wider, consistent modal */
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);

  /* ✅  Force full-width behavior */
  display: block;
}

#pdf-viewer-body,
.pdf-inner {
  width: 100%;
}

#pdf-viewer-body h2 {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: var(--primary);
  word-wrap: break-word;
}

#pdf-viewer-body iframe {
  display: block;
  width: 100%;
  min-width: 100%;
  height: 80vh;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

@media (max-width: 600px) {
  /* Keep modals fully visible on mobile */
  .modal-content,
  .pdf-modal-content {
    width: 95%;
    max-width: 95%;
    max-height: 85vh;
    padding: 1rem;
  }

  .modal-embed iframe,
  #pdf-viewer-body iframe {
    height: 60vh; /* shorter for mobile */
  }

  .pdf-modal-content h2 {
    font-size: 1rem;
  }
}
