@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', monospace;

  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 3.9%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 240 5.9% 10%;
  --radius: 0.5rem;
}

html.dark {
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;
  --card: 240 10% 5.5%;
  --card-foreground: 0 0% 98%;
  --popover: 240 10% 3.9%;
  --popover-foreground: 0 0% 98%;
  --primary: 0 0% 98%;
  --primary-foreground: 240 5.9% 10%;
  --secondary: 240 3.7% 15.9%;
  --secondary-foreground: 0 0% 98%;
  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%;
  --accent: 240 3.7% 15.9%;
  --accent-foreground: 0 0% 98%;
  --border: 240 3.7% 15.9%;
  --input: 240 3.7% 15.9%;
  --ring: 240 4.9% 83.9%;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: hsl(var(--border));
}

body {
  font-family: var(--font-sans);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Layout Container */
.container {
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navbar */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid hsl(var(--border));
  background-color: hsla(var(--background) / 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: #10b981;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: hsl(var(--foreground));
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Theme Toggle Button & UI Controls */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background-color: transparent;
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-icon:hover {
  background-color: hsl(var(--accent));
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.25rem;
  padding: 0 0.875rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: 1px solid transparent;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}

.btn-outline:hover {
  background-color: hsl(var(--accent));
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border: 1px solid transparent;
}

.btn-secondary:hover {
  background-color: hsl(var(--accent));
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  font-family: var(--font-mono);
}

/* Cards */
.card {
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.card-interactive {
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card-interactive:hover {
  border-color: hsl(var(--foreground) / 0.3);
  transform: translateY(-1px);
}

/* Sections */
main {
  flex: 1;
  padding: 2.5rem 0 4rem;
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid hsl(var(--border));
}

.profile-title h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.profile-title p {
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
}

.bio-text {
  font-size: 0.975rem;
  color: hsl(var(--foreground) / 0.9);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bio-text a {
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.bio-text a:hover {
  color: hsl(var(--muted-foreground));
}

/* Quick Navigation / Grid */
.section-title {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1rem;
}

.grid-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.875rem;
  margin-bottom: 2.5rem;
}

.nav-card {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-card-desc {
  font-size: 0.825rem;
  color: hsl(var(--muted-foreground));
}

/* Footer */
footer {
  border-top: 1px solid hsl(var(--border));
  padding: 2rem 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.85rem;
}

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

/* Mobile Nav Menu */
.mobile-menu-btn {
  display: none;
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 3.75rem;
    left: 0;
    width: 100%;
    background-color: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--border));
    padding: 1rem 1.25rem;
    gap: 0.875rem;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
}

/* Page Headers & Common Sub-page Utilities */
.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.page-desc {
  font-size: 0.95rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  row-gap: 1.75rem;
  column-gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.skill-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

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

.skill-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.015em;
}

.skill-card-desc {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.25rem;
  margin-top: auto;
  line-height: 1.8;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  font-family: var(--font-mono);
  font-weight: 500;
  transition: border-color 0.15s ease;
}

.skill-pill:hover {
  border-color: hsl(var(--foreground) / 0.4);
}

.skill-comma {
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  margin-right: 0.4rem;
}

/* Forms & Inputs (shadcn inspired) */
.input {
  display: flex;
  height: 2.5rem;
  width: 100%;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--input));
  background-color: transparent;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.15);
}

.input::placeholder {
  color: hsl(var(--muted-foreground));
}

.input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.875rem;
}

.form-label {
  font-size: 0.825rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}

/* Products & Cart Components */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  margin-bottom: 1.5rem;
}

.product-name {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}

.product-desc {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.product-desc a {
  color: hsl(var(--foreground));
  text-decoration: underline;
  text-underline-offset: 3px;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid hsl(var(--border));
}

.product-price {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.product-unit {
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
}

.cart-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

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

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid hsl(var(--border));
  font-size: 0.875rem;
}

.cart-item-title {
  font-weight: 600;
}

.cart-item-price {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
}

.cart-total-box {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cart-total-label {
  font-size: 1rem;
  font-weight: 600;
}

.cart-total-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
}

.btn-remove {
  background: transparent;
  border: none;
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.15s ease;
  padding: 0.25rem;
}

.btn-remove:hover {
  color: #ef4444;
}

.btn-checkout {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Talks Component */
.talk-card {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
}

.talk-layout {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

@media (max-width: 580px) {
  .talk-layout {
    flex-direction: column;
  }
}

.talk-poster-wrapper {
  flex-shrink: 0;
  width: 140px;
}

@media (max-width: 580px) {
  .talk-poster-wrapper {
    width: 100%;
    max-width: 220px;
  }
}

.talk-poster-link {
  position: relative;
  display: block;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--muted));
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.talk-poster-link:hover {
  border-color: hsl(var(--foreground) / 0.4);
  transform: translateY(-1px);
}

.talk-poster-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: opacity 0.15s ease;
}

.talk-poster-badge {
  position: absolute;
  bottom: 0.35rem;
  right: 0.35rem;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.talk-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.talk-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.badge-year {
  background-color: hsl(var(--foreground));
  color: hsl(var(--background));
  font-weight: 600;
}

.talk-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.talk-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.talk-title a:hover {
  text-decoration: underline;
}

.talk-desc {
  font-size: 0.9rem;
  color: hsl(var(--foreground) / 0.85);
  line-height: 1.6;
}

.talk-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid hsl(var(--border));
  margin-top: 0.25rem;
}

.talk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.talk-btn {
  font-size: 0.825rem;
  padding: 0.4rem 0.8rem;
  white-space: nowrap;
}

/* Textarea & Contact Styles */
textarea.input {
  height: auto;
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
}

.contact-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  flex-shrink: 0;
}

