/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
  /* Colors - Restrained & Intentional */
  --bg-paper: #faf8f5;       /* Warm, textured off-white editorial paper */
  --bg-card: #ffffff;        /* Pure white for visual contrast on cards */
  --text-primary: #1c1f21;   /* Softer ink-like off-black */
  --text-secondary: #586069; /* Muted gray for meta/details */
  
  /* Accent Color - Deliberate Muted Ink Blue */
  --accent: #1a3644;         
  --accent-hover: #2a4c5e;
  --accent-light: #f0f4f6;   /* Tag backgrounds and highlights */
  
  /* Borders and Dividers */
  --border: #e4e1da;
  --border-light: #efede8;
  
  /* Typography */
  --font-headings: 'Lora', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  
  /* Layout & Spacing */
  --max-width: 900px;
  --header-height: 70px;
  
  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   MODERN CSS RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

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

button {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  color: inherit;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Keyboard Accessibility Focus State */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ==========================================================================
   REUSABLE UTILITIES
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section-padding {
  padding-top: 80px;
  padding-bottom: 80px;
}

@media (min-width: 768px) {
  .section-padding {
    padding-top: 100px;
    padding-bottom: 100px;
  }
}

.section-border-top {
  border-top: 1px solid var(--border);
}

.icon {
  width: 18px;
  height: 18px;
  stroke-width: 2px;
}

/* ==========================================================================
   HEADER & STICKY NAVIGATION
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(250, 248, 245, 0.85); /* Semitransparent paper */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: var(--transition);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-family: var(--font-headings);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

/* Mobile Nav Toggle Icon */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 16px;
  z-index: 1100;
}

.nav-toggle .bar {
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition);
}

/* Navigation Drawer */
.nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background-color: var(--bg-paper);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.05);
  padding: 100px 40px 40px;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

.nav.active {
  transform: translateX(0);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.nav-link {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover, 
.nav-link.active {
  color: var(--accent);
}

/* Header animation when menu is open */
.nav-toggle.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Desktop Navigation */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
  
  .nav {
    position: static;
    width: auto;
    height: auto;
    background-color: transparent;
    border-left: none;
    box-shadow: none;
    padding: 0;
    transform: none;
    display: block;
  }
  
  .nav-list {
    flex-direction: row;
    gap: 32px;
  }
  
  .nav-link {
    font-size: 0.9rem;
  }
  
  .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
  }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 80px;
}

@media (min-width: 768px) {
  .hero-section {
    padding-top: calc(var(--header-height) + 100px);
    padding-bottom: 120px;
  }
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  font-family: var(--font-headings);
  font-size: 2.8rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--accent);
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4rem;
  }
}

.hero-tagline {
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 720px;
  color: var(--text-primary);
  margin-bottom: 36px;
}

@media (min-width: 768px) {
  .hero-tagline {
    font-size: 1.3rem;
  }
}

.hero-contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
  width: 100%;
}

@media (min-width: 600px) {
  .hero-contact-links {
    flex-direction: row;
    gap: 32px;
  }
}

.hero-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: var(--transition);
  text-align: left;
  padding: 0;
  position: relative;
}

.hero-contact-item:hover {
  color: var(--accent);
}

/* Tooltip for Copy Email button */
.tooltip {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background-color: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: var(--transition);
  white-space: nowrap;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: var(--accent) transparent transparent transparent;
}

.hero-contact-item:hover .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hero-social-links {
  display: flex;
  gap: 20px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  width: 100%;
  max-width: 450px;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  transition: var(--transition);
}

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

/* ==========================================================================
   ABOUT / SUMMARY SECTION
   ========================================================================== */
.section-title {
  font-family: var(--font-headings);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.2rem;
    margin-bottom: 40px;
  }
}

.about-content {
  max-width: 760px;
}

.lead-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .lead-text {
    font-size: 1.2rem;
  }
}

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 600px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 32px;
  }
}

.skill-category {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.skill-category-title {
  font-family: var(--font-headings);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-list li {
  font-size: 0.95rem;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.skill-detail {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   EXPERIENCE SECTION (TIMELINE CARDS)
   ========================================================================== */
.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.experience-card {
  padding: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .experience-card {
    gap: 20px;
  }
}

.experience-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

@media (min-width: 600px) {
  .experience-header {
    flex-direction: row;
    align-items: flex-start;
  }
}

.experience-role {
  font-family: var(--font-headings);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.2;
}

.experience-company {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 4px;
}

.experience-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (min-width: 600px) {
  .experience-meta {
    align-items: flex-end;
    text-align: right;
  }
}

.experience-date {
  font-weight: 500;
}

.experience-description {
  max-width: 760px;
}

.experience-description p {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: -24px;
  margin-bottom: 40px;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 650px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .projects-grid {
    gap: 32px;
  }
}

.project-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(26, 54, 68, 0.04);
}

.project-content {
  margin-bottom: 24px;
}

.project-title {
  font-family: var(--font-headings);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background-color: var(--accent-light);
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.01em;
}

.project-description {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.project-links {
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
}

.project-link-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  transition: var(--transition);
}

.project-link-item:hover:not(.link-disabled) {
  color: var(--accent-hover);
}

/* Disabled placeholder link style */
.link-disabled {
  color: var(--text-secondary);
  opacity: 0.5;
  cursor: not-allowed;
}

/* Interactive placeholder look */
.project-placeholder {
  border-style: dashed;
  border-color: var(--text-secondary);
  opacity: 0.8;
}

.project-placeholder .project-title {
  color: var(--text-secondary);
}

.project-placeholder .tag {
  color: var(--text-secondary);
  background-color: #f3f3f0;
}

.project-placeholder .project-description {
  color: var(--text-secondary);
}

/* ==========================================================================
   EDUCATION SECTION
   ========================================================================== */
.education-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.education-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.education-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

@media (min-width: 600px) {
  .education-header {
    flex-direction: row;
    align-items: baseline;
  }
}

.education-degree {
  font-family: var(--font-headings);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
}

.education-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.education-institution {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.institution-meta {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ==========================================================================
   FOOTER & CONTACT SECTION
   ========================================================================== */
.footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border);
  padding-top: 80px;
  padding-bottom: 40px;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.footer-cta {
  text-align: center;
}

.footer-cta-text {
  font-family: var(--font-headings);
  font-size: 2.2rem;
  font-weight: 500;
  font-style: italic;
  color: var(--accent);
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .footer-cta-text {
    font-size: 3rem;
  }
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--border-light);
  padding-top: 24px;
}

@media (min-width: 600px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.copyright {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--accent-light);
}

/* Screen reader only utility class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
