/* 
   Technical Writer Portfolio CSS
   A clean, professional design with focus on readability and content hierarchy
*/

/* Base Styling and CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Palette */
  --primary: #2c3e50;
  --secondary: #3498db;
  --accent: #e74c3c;
  --light: #ecf0f1;
  --dark: #2c3e50;
  --text: #333;
  --text-light: #7f8c8d;
  --background: #f9f9f9;
  
  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --font-code: 'Source Code Pro', monospace;
  
  /* Background Images */
  --hero-bg: url('images/background.png');

}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  color: var(--primary);
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: 2rem;
}

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

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

code {
  font-family: var(--font-code);
  background-color: rgba(0, 0, 0, 0.05);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

pre {
  background-color: var(--dark);
  color: var(--light);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}

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

/* Header */
header {
  background-color: var(--light);
  padding: 2rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}

.logo a {
  color: inherit;
  text-decoration: none;
}

/* Navigation */
nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

nav a.active {
  color: var(--secondary);
}

/* Hero Section */
.hero {
  padding: 8rem 0;
  background-image: linear-gradient(rgba(44, 62, 80, 0.75), rgba(44, 62, 80, 0.85)), var(--hero-bg);
  background-size: cover;
  background-position: bottom;
  background-attachment: scroll;
  color: white;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-size: 3rem;
  color: white;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.cta-button {
  display: inline-block;
  background-color: var(--accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
  background-color: #c0392b;
  text-decoration: none;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Portfolio Section */
.portfolio {
  padding: 4rem 0;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.portfolio-item {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.portfolio-image {
  height: 200px;
  overflow: hidden;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.05);
}

.portfolio-content {
  padding: 1.5rem;
}

.portfolio-content h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.portfolio-category {
  color: var(--secondary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: block;
}

.portfolio-excerpt {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.read-more {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Writing Samples */
.writing-samples {
  padding: 4rem 0;
  background-color: var(--light);
}

.sample-tabs {
  display: flex;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.sample-tab {
  padding: 1rem 1.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  margin-bottom: -2px;
  white-space: nowrap;
}

.sample-tab.active {
  border-bottom-color: var(--secondary);
  color: var(--secondary);
}

.sample-content {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Skills Section */
.skills {
  padding: 4rem 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.skill-item {
  text-align: center;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  background-color: white;
  transition: transform 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-5px);
}

.skill-icon {
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.skill-name {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Testimonials */
.testimonials {
  padding: 4rem 0;
  background-color: var(--primary);
  color: white;
}

.testimonials h2 {
  color: white;
  text-align: center;
}

.testimonial-slider {
  margin-top: 2rem;
  position: relative;
}

.testimonial-item {
  padding: 2rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin: 0 1rem;
}

.testimonial-content {
  font-style: italic;
  margin-bottom: 1.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 1rem;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-info h4 {
  color: white;
  margin-bottom: 0.25rem;
}

.author-company {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* About Me */
.about {
  padding: 4rem 0;
  position: relative;
}

.about:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95) 60%, rgba(255, 255, 255, 0.8)), var(--about-bg);
  background-size: cover;
  background-position: center;
  z-index: -1;
}

.about-content {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  position: relative;
}

.about-image {
  flex: 0 0 300px;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-text {
  flex: 1;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Contact Section */
.contact {
  padding: 4rem 0;
  background-color: var(--light);
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 90px; /* space between icons */
}

/* Footer */
footer {
  background-color: var(--dark);
  color: white;
  padding: 3rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-column {
  flex: 1;
  min-width: 200px;
}

.footer-heading {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  transition: background-color 0.3s ease;
}

.social-link:hover {
  background-color: var(--secondary);
  color: white;
  text-decoration: none;
}

.copyright {
  text-align: center;
  margin-top: 3rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.section-heading {
  text-align: center;
  margin-bottom: 2rem;
}

.section-intro {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
  color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 992px) {
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .about-content {
    flex-direction: column;
  }
  
  .about-image {
    flex: 0 0 100%;
    max-width: 400px;
    margin: 0 auto 2rem;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  nav ul {
    justify-content: center;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .footer-content {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    padding: 3rem 0;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .section-heading {
    margin-bottom: 1.5rem;
  }
  
  .portfolio-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .portfolio, 
  .skills, 
  .about, 
  .contact,
  .writing-samples {
    padding: 3rem 0;
  }
}