/*
  Sean Crotty Professional Website
  Base Stylesheet - Modernized 2025
  
  Color Palette:
  - Primary (TCU Purple): #4D1979
  - Primary Dark: #3a1259
  - Accent: #A3A9AC (silver/gray)
  - Text: #2d3436
  - Text Light: #636e72
  - Background: #fefefe
  - Surface: #f8f9fa
*/

/* ===== CSS RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --color-primary: #4D1979;
  --color-primary-dark: #3a1259;
  --color-primary-light: #6b2a9e;
  --color-accent: #c9a227;
  --color-text: #2d3436;
  --color-text-light: #636e72;
  --color-background: #fefefe;
  --color-surface: #f8f9fa;
  --color-border: #e0e0e0;
  --color-link: #4D1979;
  --color-link-hover: #6b2a9e;
  
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  
  --container-max: 1100px;
  --container-narrow: 750px;
  --spacing-unit: 1rem;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* ===== TYPOGRAPHY ===== */
/* Using system font stacks for reliability and fast loading */

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p {
  margin: 0 0 1.25rem 0;
  font-size: 1.05rem;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

strong, b {
  font-weight: 600;
  color: var(--color-text);
}

em, i {
  font-style: italic;
}

ul, ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

li {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  line-height: 1.6;
}

::selection {
  background-color: var(--color-primary);
  color: white;
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: var(--container-narrow);
}

/* ===== HEADER ===== */
.header {
  background: white;
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 1300px; /* Wider header for nav + social icons */
}

/* Name/Logo */
.name {
  margin: 0;
}

.name a {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color var(--transition-fast);
}

.name a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.name strong {
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  font-size: 0.85em;
}

/* Navigation Menu */
.menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu li {
  margin: 0;
  padding: 0;
  font-size: 1rem;
}

.menu a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.menu a:hover,
.menu a.active {
  background-color: var(--color-primary);
  color: white;
  text-decoration: none;
}

/* Social Icons */
.social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social li {
  margin: 0;
  padding: 0;
  font-size: 1rem;
}

.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-surface);
  transition: all var(--transition-fast);
}

.social a:hover {
  background-color: var(--color-primary);
  transform: translateY(-2px);
}

.social img {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  transition: all var(--transition-fast);
}

.social a:hover img {
  opacity: 1;
  filter: brightness(0) invert(1);
}

/* ===== HERO SECTION ===== */
.hero {
  background-color: var(--color-primary-dark);
  background-size: cover;
  background-position: center;
  height: 280px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(77, 25, 121, 0.85) 0%,
    rgba(58, 18, 89, 0.7) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  padding: 2rem;
}

.hero-content h1 {
  color: white;
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-content p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin: 0;
}

/* ===== MAIN CONTENT ===== */
.content {
  padding: 3rem 0;
}

.content h1 {
  margin-top: 0;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--color-primary);
  display: inline-block;
}

.content h2 {
  margin-top: 2.5rem;
  padding-left: 1rem;
  border-left: 4px solid var(--color-primary);
}

.content h3 {
  margin-top: 2rem;
  color: var(--color-text);
}

.content ul {
  list-style-type: none;
  padding-left: 0;
}

.content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.content ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

.content ol li {
  list-style-type: decimal;
}

.content img, 
.content video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  margin: 1.5rem 0;
}

/* ===== CARDS & COMPONENTS ===== */
.card {
  background: white;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
}

.card-text {
  color: var(--color-text-light);
  margin: 0;
}

/* Project Gallery */
/* ===== PROFILE/ABOUT SECTION ===== */
.about-section {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.about-photo {
  flex-shrink: 0;
}

.about-photo img {
  width: 180px;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  border: none;
  margin: 0;
}

.about-text {
  flex: 1;
}

.about-text h1 {
  margin-top: 0;
}

/* Project Gallery */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-card a {
  text-decoration: none;
  color: inherit;
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.project-card .caption {
  padding: 1.25rem;
}

.project-card .caption h4 {
  margin: 0 0 0.5rem 0;
  color: var(--color-primary);
  font-size: 1.1rem;
}

.project-card .caption p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin: 0;
  line-height: 1.5;
}

/* ===== PUBLICATION LIST ===== */
.publication {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.publication:last-child {
  border-bottom: none;
}

.publication p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
}

.publication a {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  background: var(--color-surface);
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.publication a:hover {
  background: var(--color-primary);
  color: white;
  text-decoration: none;
}

/* ===== COURSE LIST ===== */
.course-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.course-list li {
  padding: 0;
  margin: 0;
}

.course-list li::before {
  display: none;
}

.course-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.course-list a:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.course-list .course-icon {
  font-size: 1.5rem;
}

.course-list .course-title {
  font-weight: 500;
  color: var(--color-text);
}

.course-list a:hover .course-title {
  color: var(--color-primary);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
  text-decoration: none;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer h4 {
  color: white;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1rem 0;
}

.footer p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 0.5rem 0;
}

.footer a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer a:hover {
  color: white;
  text-decoration: underline;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.footer-links li::before {
  display: none;
}

.footer-bottom {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 2rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.py-1 { padding-top: 1rem; padding-bottom: 1rem; }
.py-2 { padding-top: 2rem; padding-bottom: 2rem; }
.py-3 { padding-top: 3rem; padding-bottom: 3rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 900px) {
  .header .container {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .menu {
    justify-content: center;
  }
  
  .social {
    justify-content: center;
  }
  
  .hero {
    height: 200px;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  html {
    font-size: 15px;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .name a {
    font-size: 1.25rem;
  }
  
  .menu {
    gap: 0.15rem;
  }
  
  .menu a {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }
  
  .content {
    padding: 2rem 0;
  }
  
  .about-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .about-photo img {
    width: 150px;
  }
  
  .about-text h1 {
    border-bottom: none;
    display: block;
  }
  
  .footer .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .project-gallery {
    grid-template-columns: 1fr;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .header,
  .footer,
  .social,
  .hero {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  .content {
    padding: 0;
  }
}
