/* ============================================
   Berrie Trippe — Personal Website
   Light, modern redesign
   ============================================ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Palette — warm, light, natural */
  --white: #ffffff;
  --bg: #faf9f7;
  --bg-alt: #f2f0ec;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #555555;
  --text-tertiary: #888888;
  --accent: #3d5a80;
  --accent-light: #e8eef4;
  --border: #e5e3df;
  --border-hover: #c8c5bf;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);

  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Space Mono", monospace;
  --container: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

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

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

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

::selection {
  background: var(--accent);
  color: var(--white);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.accent {
  color: var(--accent);
}

/* =====================
   Hero
   ===================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-content {
  max-width: 540px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--accent);
  background: var(--accent-light);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero-name {
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.strikethrough {
  text-decoration: line-through;
  color: var(--text-tertiary);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-photo-wrapper {
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.hero-photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =====================
   Buttons
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  border: none;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 14px 8px;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-lg {
  padding: 18px 36px;
  font-size: 1.05rem;
}

/* =====================
   Sections
   ===================== */
.section {
  padding: 120px 0;
}

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

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.section-heading {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 48px;
}

/* =====================
   About
   ===================== */
.about-layout {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 72px;
  align-items: center;
}

.about-image {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.about-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.about-text strong {
  color: var(--text);
  font-weight: 600;
}

.about-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.pill {
  display: inline-block;
  padding: 8px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s var(--ease);
}

.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* =====================
   Work Previews (horizontal scroll)
   ===================== */
.previews-section {
  padding-bottom: 120px;
  overflow: hidden;
}

.previews-track {
  display: flex;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - var(--container)) / 2 + 24px));
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}

.previews-track::-webkit-scrollbar {
  display: none;
}

.previews-track:active {
  cursor: grabbing;
}

.preview-card {
  flex: 0 0 560px;
  scroll-snap-align: start;
  border-radius: 0;
  overflow: hidden;
  background: #000;
  transition: all 0.3s var(--ease);
}

.preview-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.preview-video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.preview-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  transition: transform 0.4s var(--ease);
}

.preview-card:hover .preview-video video {
  transform: scale(1.2);
}

.preview-video::after {
  content: "";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  opacity: 1;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 48px;
}

.preview-video.playing::after {
  opacity: 0;
}

.preview-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 24px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

.preview-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* =====================
   Image Divider
   ===================== */
.image-divider {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
}

.image-divider img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: center 40%;
}

/* =====================
   Experience
   ===================== */
.exp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  transition: all 0.3s var(--ease);
}

.exp-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.exp-card-featured {
  grid-column: 1 / -1;
}

.exp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.exp-role {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.exp-company {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 2px;
}

.exp-type {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  background: var(--bg-alt);
  padding: 4px 12px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

.exp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.exp-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

/* =====================
   Education
   ===================== */
.edu-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.edu-card {
  display: flex;
  gap: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s var(--ease);
}

.edu-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.edu-degree {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edu-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 4px;
}

.edu-school {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 2px;
}

.edu-date {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.edu-thesis {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 8px;
}

.edu-thesis em {
  color: var(--text);
  font-style: italic;
}

.edu-thesis-desc {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  line-height: 1.65;
  margin-bottom: 12px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}

/* =====================
   Contact
   ===================== */
.section-contact {
  background: var(--text);
  color: var(--white);
  text-align: center;
}

.contact-inner {
  max-width: 560px;
  margin: 0 auto;
}

.section-contact .section-label {
  color: rgba(255, 255, 255, 0.4);
}

.contact-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 20px;
}

.contact-text {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.75;
  margin-bottom: 36px;
}

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

.section-contact .btn-primary:hover {
  background: var(--accent-light);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* =====================
   Footer
   ===================== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.footer p {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

/* =====================
   Animations
   ===================== */
.anim-fade {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.65s var(--ease) forwards;
}

.anim-fade[data-delay="0"] {
  animation-delay: 0s;
}
.anim-fade[data-delay="1"] {
  animation-delay: 0.12s;
}
.anim-fade[data-delay="2"] {
  animation-delay: 0.24s;
}
.anim-fade[data-delay="3"] {
  animation-delay: 0.38s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
    order: 2;
  }

  .hero-photo {
    order: 1;
    max-width: 360px;
    margin: 0 auto;
  }

  .hero-subtitle {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 36px;
  }

  .hero-actions {
    justify-content: center;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    max-width: 400px;
    margin: 0 auto;
  }

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

  .exp-card-featured {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 80px 0;
  }
  .hero {
    padding: 60px 0;
  }

  .hero-photo-wrapper {
    border-radius: 18px;
  }

  .edu-card {
    flex-direction: column;
    gap: 16px;
    padding: 24px;
  }

  .edu-degree {
    width: 52px;
    height: 52px;
    font-size: 1rem;
  }

  .exp-card {
    padding: 22px;
  }

  .exp-card-top {
    flex-direction: column;
    gap: 6px;
  }

  .preview-card {
    flex: 0 0 85vw;
  }

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

  .image-divider img {
    height: 300px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

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

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