/* Global reset-ish */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f5f5f5;
  color: #282828;
  line-height: 1.6;
}

/* =====================
   ACCESSIBILITY FEATURES
   ===================== */

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background-color: #008b57;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #282828;
  outline-offset: 2px;
}

/* Accessibility Menu Button - Right side, halfway down */
.a11y-button {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background-color: #008b57;
  border: 2px solid #006b43;
  border-radius: 50%;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.a11y-button img {
  display: block;
  width: 42px;
  height: 42px;
}

.a11y-button:hover,
.a11y-button:focus {
  background-color: #006b43;
  transform: translateY(-50%) scale(1.05);
}

.a11y-button:focus {
  outline: 3px solid #282828;
  outline-offset: 3px;
}

.a11y-button svg {
  width: 42px;
  height: 42px;
  fill: #ffffff;
}

/* Accessibility Panel */
.a11y-panel {
  position: fixed;
  right: 1rem;
  top: calc(50% + 40px);
  background-color: #ffffff;
  border: 2px solid #008b57;
  border-radius: 8px;
  padding: 1rem;
  width: 220px;
  z-index: 998;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: none;
}

.a11y-panel.is-open {
  display: block;
}

.a11y-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: #008b57;
}

.a11y-panel button {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  background-color: #f5f5f5;
  border: 1px solid #cccccc;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  font-size: 0.9rem;
}

.a11y-panel button:hover,
.a11y-panel button:focus {
  background-color: #008b57;
  color: #ffffff;
  border-color: #008b57;
}

.a11y-panel button:focus {
  outline: 2px solid #282828;
  outline-offset: 2px;
}

/* Global visible focus states */
*:focus {
  outline: 2px solid #008b57;
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

*:focus-visible {
  outline: 3px solid #008b57;
  outline-offset: 2px;
}

/* Layout container */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Header */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.branding {
  min-width: 200px;
}

.site-title {
  margin: 0;
  font-size: 1.7rem;
  font-weight: bold;
  color: #008b57;
}

.site-tagline {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: #555555;
}

/* Navigation */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.main-nav li {
  margin: 0;
}

.nav-link {
  display: block;
  padding: 0.7rem 1rem;
  text-decoration: none;
  color: #282828;
  font-size: 0.95rem;
  border-radius: 4px;
}

.nav-link:hover,
.nav-link:focus {
  background-color: #000000;
  color: #ffffff;
}

.nav-link.current {
  background-color: #008b57;
  color: #ffffff;
}

/* Hero */
.hero {
  background-color: #ededed;
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid #dddddd;
  text-align: left;
}

.hero-kicker {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: #555555;
}

.hero-title {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  color: #282828;
}

.hero-subtitle {
  margin: 0 0 1.5rem;
  max-width: 40rem;
  color: #444444;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: 4px;
  border: 2px solid transparent;
  font-size: 0.95rem;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background-color: #008b57;
  color: #ffffff !important;
  border-color: #008b57;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #006b43;
  border-color: #006b43;
  color: #ffffff !important;
}

.btn-primary:visited {
  background-color: #008b57;
  color: #ffffff !important;
}

.btn-ghost {
  background-color: #ffffff;
  color: #008b57;
  border: 2px solid #cccccc;
  border-radius: 4px;
}

.btn-ghost:hover,
.btn-ghost:focus {
  border-color: #008b57;
  color: #006b43;
}

/* Sections */
.section {
  padding: 2rem 0 1rem;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
}

.section h2 {
  margin-top: 0;
  font-size: 1.6rem;
}

.section h3 {
  margin-top: 1.5rem;
  font-size: 1.2rem;
}

/* Lists */
ul {
  padding-left: 1.25rem;
}

/* Links - green underlined, consistent for default and visited */
a {
  color: #008b57;
  text-decoration: underline;
}

a:visited {
  color: #008b57;
}

a:hover,
a:focus {
  color: #006b43;
  text-decoration: underline;
}

a:active {
  color: #004d32;
}

/* Special inline link styling */
.text-link {
  font-weight: 500;
}

/* Accordion (details/summary) */
.accordion {
  margin-top: 1.25rem;
  border: 1px solid #006b43;
  border-radius: 4px;
  background-color: #008b57;
  color: #ffffff;
}

.accordion summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-weight: 600;
  list-style: none;
  color: #ffffff;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "+";
  float: right;
  font-weight: 700;
  color: #ffffff;
}

.accordion[open] summary::after {
  content: "–";
}

.accordion-body {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid #006b43;
  background-color: #008b57;
  color: #ffffff;
}

/* Table inside accordion */
.accordion-body table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #ffffff;
  margin-top: 0.5rem;
}

.accordion-body th,
.accordion-body td {
  border: 1px solid #ffffff;
  padding: 0.85rem 1rem;
  text-align: left;
  color: #ffffff;
}

.accordion-body th {
  background-color: #282828;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.accordion-body tr:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* Footer */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid #e0e0e0;
  font-size: 0.85rem;
  color: #555555;
}

.site-footer p {
  margin: 0.75rem 0;
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 1.25rem;
  }

  .hero {
    text-align: left;
    padding: 2.5rem 0 2rem;
  }

  .btn-ghost {
    display: inline-block;
    margin-top: 0.75rem;
    margin-left: 0;
  }
}

/* =====================
   PORTFOLIO / PROJECTS GRID
   ===================== */

.portfolio-intro,
.projects-intro {
  margin-bottom: 2rem;
}

/* Grid layout - 4 columns like podcast page */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

/* Card component - clickable, image on top, text below */
.card {
  background-color: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.card:focus-within {
  box-shadow: 0 0 0 3px #008b57;
}

/* Card link - makes entire card clickable */
.card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: 100%;
}

.card-link:focus {
  outline: none;
}

.card-link:focus .card-image {
  outline: 3px solid #008b57;
  outline-offset: -3px;
}

/* Card image container */
.card-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 4px solid #ffffff;
  border-bottom: none;
  box-shadow: inset 0 0 0 1px #e0e0e0;
  flex-shrink: 0;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder image styling */
.card-image-placeholder {
  width: 100%;
  height: 100%;
  background-color: #ededed;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888888;
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

/* Card content area - grows to fill remaining space */
.card-content {
  padding: 0.875rem 1rem;
  background-color: #008b57;
  color: #ffffff;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  min-height: 2.6em; /* Reserve space for 2 lines */
}

.card-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.card-description {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.95;
  flex-grow: 1;
}

/* Alternative card style for projects (more narrative) */
.card--project .card-content {
  background-color: #282828;
}

.card--project:hover .card-content {
  background-color: #008b57;
}

/* View toggle (grid/list icons from screenshot) */
.view-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.view-toggle-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: #555555;
  border-radius: 4px;
}

.view-toggle-btn:hover,
.view-toggle-btn:focus,
.view-toggle-btn.is-active {
  color: #282828;
  background-color: #e0e0e0;
}

/* =====================
   RESUME PAGE STYLES
   ===================== */

.resume-download {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #ededed;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.resume-download p {
  margin: 0;
}

/* =====================
   RESPONSIVE ADJUSTMENTS
   ===================== */

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 680px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .a11y-button {
    right: 0.5rem;
    width: 44px;
    height: 44px;
  }
  
  .a11y-panel {
    right: 0.5rem;
    width: 200px;
  }
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .main-nav ul {
    flex-direction: column;
    width: 100%;
  }
  
  .nav-link {
    padding: 0.6rem 0;
  }
}

/* =====================
   HOMEPAGE SECTIONS
   ===================== */

/* Services grid - 3 columns */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.service-card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover,
.service-card:focus-within {
  border-color: #008b57;
  box-shadow: 0 4px 12px rgba(0, 139, 87, 0.1);
}

.service-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  background-color: #008b57;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}

.service-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: #282828;
}

.service-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #555555;
  line-height: 1.5;
}

/* Featured work - 4 columns preview */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

/* Section header with link */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.section-header h2,
.section-header h3 {
  margin: 0;
}

.view-all-link {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Current focus highlight box */
.focus-box {
  background-color: #008b57;
  color: #ffffff;
  padding: 1.5rem 2rem;
  border-radius: 6px;
  margin-top: 1rem;
}

.focus-box h3 {
  margin: 0 0 0.5rem;
  color: #ffffff;
  font-size: 1.1rem;
}

.focus-box p {
  margin: 0;
  opacity: 0.95;
}

.focus-box a {
  color: #ffffff;
  font-weight: 600;
}

.focus-box a:hover,
.focus-box a:focus {
  color: #e0e0e0;
}

/* Quick access buttons row */
.quick-access {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.quick-access .btn {
  flex: 1;
  min-width: 150px;
  text-align: center;
}

/* Credibility callout */
.credibility {
  background-color: #f5f5f5;
  border-left: 4px solid #008b57;
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.credibility p {
  margin: 0;
}

/* Responsive adjustments for homepage */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .featured-grid {
    grid-template-columns: 1fr;
  }
  
  .quick-access {
    flex-direction: column;
  }
  
  .quick-access .btn {
    width: 100%;
  }
}

/* =====================
   HIGH CONTRAST MODE
   ===================== */

.high-contrast {
  --hc-bg: #000000;
  --hc-text: #ffffff;
  --hc-link: #ffff00;
  --hc-border: #ffffff;
}

.high-contrast body,
.high-contrast .section,
.high-contrast .site-header,
.high-contrast .site-footer,
.high-contrast .card-content,
.high-contrast .accordion-body {
  background-color: var(--hc-bg) !important;
  color: var(--hc-text) !important;
}

.high-contrast a,
.high-contrast a:visited {
  color: var(--hc-link) !important;
}

.high-contrast .nav-link,
.high-contrast .nav-link:visited {
  color: var(--hc-text) !important;
}

.high-contrast .nav-link.current,
.high-contrast .nav-link:hover,
.high-contrast .nav-link:focus {
  background-color: var(--hc-link) !important;
  color: var(--hc-bg) !important;
}

.high-contrast .btn-primary {
  background-color: var(--hc-link) !important;
  color: var(--hc-bg) !important;
  border-color: var(--hc-link) !important;
}

.high-contrast .card {
  border-color: var(--hc-border) !important;
}

.high-contrast .card-image-placeholder {
  background-color: #333333 !important;
  color: var(--hc-text) !important;
}

.high-contrast .accordion {
  background-color: #333333 !important;
  border-color: var(--hc-border) !important;
}

/* =====================
   PRINT STYLES
   ===================== */

@media print {
  .skip-link,
  .a11y-button,
  .a11y-panel,
  .site-header,
  .site-footer,
  .resume-download {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
  
  a {
    text-decoration: none;
    color: black;
  }
  
  .section {
    border: none;
    padding: 0.5rem 0;
  }
}
/* ----------------------------------------
   BIT Interview Prep Page
   ---------------------------------------- */

.bit-section {
  margin-bottom: 2rem;
}

.bit-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
}

.bit-card h3 {
  margin-top: 0;
}

.bit-toc {
  background: #f3f3f3;
  border: 1px solid #dcdcdc;
  padding: 1rem;
  margin: 2rem 0;
  border-radius: 6px;
}

.bit-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bit-toc li {
  margin-bottom: 0.5rem;
}

.bit-toc a {
  color: #008b57;
  text-decoration: none;
  font-weight: bold;
}

.bit-toc a:hover {
  text-decoration: underline;
}
