/* ============================================
   Lucy Linder - Personal Website
   A clean, teal-accented design with personality
   ============================================ */

/* --- CSS Variables --- */
:root {
  --color-teal: #0d9488;
  --color-teal-light: #14b8a6;
  --color-teal-dark: #0f766e;
  --color-teal-subtle: #ccfbf1;
  --color-gold: #d4a853;
  --color-gold-subtle: #fef9e7;
  --color-gold-dark: #a07c3a;
  --color-coral: #e07a5f;
  --color-coral-subtle: #fdf0ed;
  --color-coral-dark: #c45a3f;
  --color-navy: #1e293b;
  --color-navy-light: #334155;
  --color-gray: #64748b;
  --color-gray-light: #94a3b8;
  --color-bg: #fafafa;
  --color-bg-alt: #f1f5f9;
  --color-white: #ffffff;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --max-width: 900px;
  --border-radius: 8px;
  --transition: 0.2s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-navy);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-teal);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-teal-dark);
}

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

ul {
  list-style: none;
}

h2, h3 {
  text-transform: capitalize;
}

/* --- Decorative Curves (Tentacle-esque) --- */
.decorative-curves {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}

.curve {
  stroke: var(--color-teal);
  stroke-width: 0.3;
  stroke-linecap: round;
}

.curve-1 {
  animation: float 20s ease-in-out infinite;
}

.curve-2 {
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  transition: opacity var(--transition);
}

.nav-logo-img {
  width: 40px;
  height: 40px;
  transition: transform var(--transition);
}

.nav-logo-img:hover {
  transform: rotate(10deg);
}

.nav-logo.hidden {
  opacity: 0;
  pointer-events: none;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
}

.nav-links a {
  color: var(--color-navy);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-teal);
  transition: width var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  position: relative;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: 220px;
  height: auto;
  margin: 0 auto var(--space-lg);
  animation: gentle-bob 4s ease-in-out infinite;
}

@keyframes gentle-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-name {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--color-teal);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.hero-summary {
  font-size: 1.1rem;
  color: var(--color-gray);
  margin-bottom: var(--space-lg);
}

.hero-cta {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero social links */
.hero-socials {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-teal);
  border: 2px solid var(--color-teal);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: wave 2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.1s);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.social-link:hover {
  background: var(--color-teal);
  color: var(--color-white);
  transform: translateY(-6px) rotate(10deg) scale(1.1);
  box-shadow: 4px 4px 0 var(--color-navy);
}

.social-link:nth-child(even):hover {
  transform: translateY(-6px) rotate(-10deg) scale(1.1);
}

@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.hero-scroll {
  position: absolute;
  bottom: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-gray-light);
  font-size: 0.8rem;
  animation: bounce 2s ease-in-out infinite;
  text-decoration: none;
  transition: color var(--transition);
}

.hero-scroll:hover {
  color: var(--color-teal);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-teal);
  color: var(--color-white);
  border-color: var(--color-teal);
}

.btn-primary:hover {
  background: var(--color-teal-dark);
  border-color: var(--color-teal-dark);
  color: var(--color-white);
}

.btn-secondary {
  background: transparent;
  color: var(--color-teal);
  border-color: var(--color-teal);
}

.btn-secondary:hover {
  background: var(--color-teal);
  color: var(--color-white);
}

/* --- Section Base --- */
.section {
  padding: var(--space-2xl) var(--space-md);
  position: relative;
  z-index: 1;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Wider container for bento grid */
#projects .section-inner {
  max-width: 1100px;
}

.section-title {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-xl);
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--color-teal);
  margin: var(--space-sm) auto 0;
  border-radius: 2px;
}

.subsection-title {
  font-size: 1.3rem;
  color: var(--color-teal);
  margin: var(--space-xl) 0 var(--space-lg);
  text-align: center;
}

/* --- About Section --- */
.about-intro {
  font-size: 1.15rem;
  line-height: 1.8;
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-xl);
  color: var(--color-navy-light);
}

#skills p {
  margin: 1rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.skill-card {
  background: var(--color-white);
  padding: var(--space-md);
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.skill-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-teal);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.skill-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.skill-card li {
  font-size: 0.85rem;
  color: var(--color-gold-dark);
  background: var(--color-gold-subtle);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.about-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.about-link {
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--color-teal-subtle);
  border-radius: 4px;
  transition: all var(--transition);
}

.about-link:hover {
  background: var(--color-teal);
  color: var(--color-white);
  border-color: var(--color-teal);
}

/* --- Career Eras --- */
.career-eras {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 3rem;
  margin: 2rem 0;
}

.career-era {
  padding: 0;
  border: none;
  background: transparent;
}

.era-name {
  font-weight: 600;
  color: var(--color-teal);
  font-size: 1.05rem;
  transition: color var(--transition);
}

.era-years {
  color: var(--color-gray-light);
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

.era-details {
  color: var(--color-gray);
  font-size: 0.95rem;
  margin-top: 0.25rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.career-era:hover .era-name {
  color: var(--color-teal-light);
}

@media (max-width: 768px) {
  .career-eras {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* --- Projects Section (Bento Box) --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: min-content;
  grid-auto-flow: dense;
  gap: var(--space-sm);
}

/* Bento layout - featured items */
@media (min-width: 700px) {
  .project-card:nth-child(1) {
    grid-column: span 2;
  }

  .project-card:nth-child(5) {
    grid-column: span 2;
  }
}

.project-card {
  background: var(--color-white);
  padding: var(--space-sm);
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.project-card:hover {
  transform: translateY(-8px) rotate(-1deg);
  box-shadow: 8px 8px 0px var(--color-teal);
}

/* Alternate rotation direction for variety */
.project-card:nth-child(even):hover {
  transform: translateY(-8px) rotate(1deg);
}

.project-logo {
  width: 36px;
  height: 36px;
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.project-card h3 {
  font-size: 1rem;
  color: var(--color-navy);
  margin-bottom: var(--space-xs);
}

.project-summary {
  color: var(--color-gray);
  margin-bottom: var(--space-sm);
  flex-grow: 1;
  font-size: 0.85rem;
  line-height: 1.5;
}

.project-summary p {
  margin-bottom: var(--space-xs);
}

.project-summary p:last-child {
  margin-bottom: 0;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: auto;
}

.project-links a {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  /* background: var(--color-teal-subtle); */
  border-radius: 4px;
  transition: all var(--transition);
  border: 1px solid var(--color-teal);
}

.project-links a:hover {
  background: var(--color-teal);
  color: var(--color-white);
}

/* Mobile: reduced hover effect */
@media (max-width: 600px) {
  .project-card:hover {
    transform: translateY(-4px) rotate(0deg);
    box-shadow: 4px 4px 0px var(--color-teal);
  }

  .project-card:nth-child(even):hover {
    transform: translateY(-4px) rotate(0deg);
  }
}

/* --- Timeline (Shared funky style) --- */
.timeline {
  position: relative;
  padding-left: var(--space-lg);
}

/* Thin, barely-there teal line */
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(13, 148, 136, 0.2);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-lg);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* Solid teal dot with bg-color ring + soft gold glow */
.timeline-marker {
  position: absolute;
  left: calc(-1 * var(--space-lg));
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--color-navy);
  border: none;
  border-radius: 50%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 0 6px var(--color-white);
}

.timeline-item:hover .timeline-marker {
  transform: scale(1.4);
  background: var(--color-teal);
}


.timeline-content {
  padding: 0;
}

.timeline-header {
  margin-bottom: var(--space-xs);
}

.timeline-header h3 {
  font-size: 1.1rem;
  color: var(--color-navy);
}

.timeline-company {
  font-size: 0.95rem;
  color: var(--color-navy);
  font-weight: 700;
}

a.timeline-company {
  text-decoration: none;
  border-bottom: 1.5px solid var(--color-teal-subtle);
  transition: border-color var(--transition), color var(--transition);
}

a.timeline-company:hover {
  color: var(--color-teal);
  border-bottom-color: var(--color-teal);
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: var(--space-xs);
}

.timeline-content p {
  color: var(--color-gray);
  font-size: 0.95rem;
}

.timeline-highlights {
  margin-top: var(--space-sm);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.timeline-highlights li {
  font-size: 0.8rem;
  background: var(--color-gold-subtle);
  color: var(--color-gold-dark);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}


/* --- Publications --- */
.publications-list {
  display: flex;
  flex-direction: column;
}

.publication-card {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  align-items: start;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border, #e8e8e8);
  text-decoration: none;
  transition: background 0.2s;
}

.publication-card:first-child {
  border-top: 1px solid var(--color-border, #e8e8e8);
}

.publication-year {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-navy);
  opacity: 0.12;
  line-height: 1;
  padding-top: 0.15em;
  transition: opacity 0.2s;
}

.publication-card:hover .publication-year {
  opacity: 0.3;
}

.publication-body h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.publication-body h3 a {
  color: var(--color-navy);
  text-decoration: none;
}

.publication-card:hover .publication-body h3 a {
  color: var(--color-teal);
}

.publication-publisher {
  display: block;
  font-size: 0.8rem;
  color: var(--color-teal);
  margin-bottom: var(--space-xs);
}

.publication-body p {
  color: var(--color-gray);
  font-size: 0.875rem;
  margin: 0;
}

.publication-arrow {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--color-gray-light);
  flex-shrink: 0;
  margin-top: 0.2em;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.2s, transform 0.2s;
}

.publication-card:hover .publication-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* Awards */
.awards-list {
  display: grid;
  gap: var(--space-md);
}

.award-card {
  background: var(--color-white);
  padding: var(--space-md);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--color-teal);
}

.award-card h4 {
  font-size: 1rem;
  color: var(--color-navy);
  margin-bottom: var(--space-xs);
}

.award-meta {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-gray-light);
  margin-bottom: var(--space-sm);
}

.award-card p {
  color: var(--color-gray);
  font-size: 0.9rem;
}

/* --- Education Section --- */
.education-columns {
  display: flex;
  gap: var(--space-xl);
}

.education-columns .timeline {
  flex: 1;
}

/* Education uses simpler content (no cards) */
.education-columns .timeline-content {
  background: none;
  box-shadow: none;
  padding: 0;
}


.education-columns .timeline-content h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.timeline-degree {
  font-size: 0.9rem;
  color: var(--color-gray);
  margin-bottom: var(--space-xs);
}

.timeline-awards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: var(--space-xs);
}

.timeline-awards li {
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--color-gold-subtle);
  color: var(--color-gold-dark);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .education-columns {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .timeline::before,
  .timeline-marker {
    display: none;
  }
}

/* --- Contact Section --- */
.section-contact {
  background: linear-gradient(135deg, var(--color-teal-dark) 0%, var(--color-teal) 100%);
  color: var(--color-white);
}

.section-contact .section-title {
  color: var(--color-white);
}

.section-contact .section-title::after {
  background: var(--color-white);
}

.contact-intro {
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 500px;
  margin: 0 auto var(--space-lg);
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.section-contact .btn-primary {
  background: var(--color-white);
  color: var(--color-teal);
  border-color: var(--color-white);
}

.section-contact .btn-primary:hover {
  background: transparent;
  color: var(--color-white);
}

.section-contact .btn-secondary {
  border-color: var(--color-white);
  color: var(--color-white);
}

.section-contact .btn-secondary:hover {
  background: var(--color-white);
  color: var(--color-teal);
}

.contact-download {
  text-align: center;
}

.contact-download p {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: var(--space-sm);
}

.cv-download {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-white);
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius);
  margin: 0 var(--space-xs);
  transition: all var(--transition);
}

.cv-download:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--color-white);
}

.cv-download svg {
  opacity: 0.8;
}

/* --- Footer --- */
.footer {
  background: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-logo {
  width: 50px;
  margin: 0 auto var(--space-sm);
  opacity: 0.6;
  filter: invert(1);
}

.footer p {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: var(--space-md);
    gap: var(--space-sm);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

  .nav-links a {
    display: block;
    width: 100%;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-logo {
    width: 140px;
  }

  .section {
    padding: var(--space-xl) var(--space-sm);
  }

  .timeline {
    padding-left: var(--space-md);
  }

  .decorative-curves {
    display: none;
  }

  .cv-download {
    display: flex;
    margin: var(--space-xs) 0;
  }

  .publication-card {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

  .publication-year {
    display: none;
  }

  .publication-body {
    padding: 0 var(--space-sm);
  }

  .publication-arrow {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}
