/**
 * Minimal Stylesheet
 * Clean, content-first design
 */

/* CSS Variables */
:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #666666;
  --color-link: #1a1a1a;
  --color-border: #e5e5e5;
  
  /* Y Combinator style font - system fonts */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Arial, sans-serif;
  
  --font-size-base: 16px;
  --font-size-small: 14px;
  
  --line-height: 1.6;
  
  --max-width: 800px;
  --padding: 24px;
}

[data-theme="dark"] {
  --color-bg: #000000;
  --color-text: #ffffff;
  --color-text-secondary: #999999;
  --color-link: #ffffff;
  --color-border: #333333;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--padding);
  padding-top: var(--padding);
  padding-bottom: var(--padding);
}

/* Typography */
h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 32px;
  color: var(--color-text);
}

h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--color-text);
  font-style: italic;
}

.about-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-list li {
  margin-bottom: 12px;
  padding-left: 24px;
}

.about-list li::before {
  content: "•";
  margin-left: -24px;
  margin-right: 8px;
  color: var(--color-text);
}

p {
  margin-bottom: 16px;
}

ul {
  list-style: none;
  padding-left: 0;
}

li {
  margin-bottom: 8px;
  padding-left: 0;
}

/* Links */
a {
  color: var(--color-link);
  text-decoration: none;
  border-bottom: 1px dotted var(--color-link);
  transition: border-style 0.2s ease;
}

a:hover {
  border-bottom-style: dashed;
}

/* Navigation */
nav {
  margin-bottom: 32px;
  margin-top: 0;
}

.nav-container {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: none;
}

.nav-logo:hover {
  border-bottom: none;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  font-size: var(--font-size-base);
  color: var(--color-link);
  border-bottom: none;
}

.nav-link:hover {
  border-bottom: none;
  opacity: 0.7;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.theme-toggle .sun-icon {
  display: block;
}

.theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: block;
}

/* Content Sections */
.content-section {
  margin-bottom: 32px;
}

.content-section::after {
  content: "";
  display: table;
  clear: both;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-image-container {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-image.loaded {
  opacity: 1;
}

.profile-info {
  flex: 1;
  height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.profile-name {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 6px 0;
  line-height: 1.2;
  color: var(--color-text);
}

.profile-university {
  margin: 0 0 4px 0;
  line-height: 1.4;
  color: var(--color-text);
}

.profile-location {
  margin: 0 0 12px 0;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.profile-social {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.profile-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  text-decoration: none;
  transition: border-color 0.2s ease;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border) !important;
}

.profile-social-link:hover {
  border-color: var(--color-text) !important;
  border-bottom: 1px solid var(--color-text) !important;
}

.profile-social-link .social-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) saturate(100%);
}

[data-theme="dark"] .profile-social-link .social-logo {
  filter: brightness(0) saturate(100%) invert(1);
}

.current-roles,
.past-roles {
  margin-bottom: 24px;
}

.role-item {
  margin-bottom: 12px;
  padding-left: 24px;
}

.role-item::before {
  content: "•";
  margin-left: -24px;
  color: var(--color-text);
}

.role-text {
  color: var(--color-text);
}

.role-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.project-item {
  margin-bottom: 12px;
  padding-left: 24px;
}

.project-item::before {
  content: "•";
  margin-left: -24px;
  color: var(--color-text);
}

.project-title {
  font-weight: 600;
  display: inline;
}

.project-logo {
  height: 1.2em;
  width: auto;
  vertical-align: middle;
  display: inline-block;
  margin-left: 0.25rem;
  text-decoration: none;
}

a + .project-logo {
  margin-left: 0.25rem;
}

/* Footer */
footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
}

.footer-content-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-social {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  text-decoration: none !important;
  transition: border-color 0.2s ease;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border) !important;
}

.footer-social-link:hover {
  border-color: var(--color-text);
  border-bottom: 1px solid var(--color-text) !important;
  border-bottom-style: solid !important;
  text-decoration: none !important;
}

.footer-social-link .social-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) saturate(100%);
}

[data-theme="dark"] .footer-social-link .social-logo {
  filter: brightness(0) saturate(100%) invert(1);
}

.webring-widget {
  display: flex;
  align-items: center;
  gap: 8px;
}

.webring-widget a {
  text-decoration: none !important;
  border-bottom: none !important;
}

.webring-widget a:hover {
  border-bottom: none !important;
}

.webring-widget img {
  width: 24px !important;
  height: 24px !important;
}

.webring-widget a[style*="font-size"] {
  font-size: 1.2rem !important;
}

.footer-copyright {
  text-align: center;
  margin: 0;
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
}

/* Archive Section */
.archive-content {
  margin-bottom: 0;
}

.archive-content p {
  margin-bottom: 24px;
  color: var(--color-text);
}

.archive-photos-carousel {
  position: relative;
  margin-bottom: 32px;
}

.archive-photos-wrapper {
  overflow: hidden;
  margin: 0;
}

.archive-photos-track {
  display: flex;
  gap: 16px;
  transition: transform 0.3s ease;
}

.archive-photo-item {
  margin: 0;
  flex: 0 0 calc(33.333% - 11px);
  min-width: 0;
}

.archive-photo {
  width: 100%;
  height: 200px;
  border-radius: 4px;
  display: block;
  object-fit: cover;
  background-color: var(--color-bg-secondary);
}

.archive-photo-caption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-text-secondary);
  text-align: left;
  line-height: 1.4;
}

.carousel-btn {
  position: absolute;
  top: 100px;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  color: white;
  padding: 0;
  backdrop-filter: blur(4px);
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-btn svg {
  width: 20px;
  height: 20px;
}

.carousel-btn-prev {
  left: 12px;
}

.carousel-btn-next {
  right: 12px;
}

.archive-videos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.archive-video-item {
  margin: 0;
}

.archive-video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 4px;
  background-color: var(--color-bg-secondary);
}

.archive-video-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.archive-video-caption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-text-secondary);
  text-align: left;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .archive-videos {
    grid-template-columns: 1fr;
  }
  
  .archive-photo-item {
    flex: 0 0 100%;
  }
  
  .carousel-btn-prev {
    left: 8px;
  }
  
  .carousel-btn-next {
    right: 8px;
  }
}

/* Responsive */
@media (max-width: 640px) {
  main {
    padding: 16px;
    padding-top: 60px;
  }
  
  nav {
    padding: 16px;
  }
  
  .nav-links {
    gap: 16px;
  }
  
  h1 {
    font-size: 20px;
  }
}
