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

:root {
  --bg: #fafafa;
  --text: #18181b;
  --text-secondary: #71717a;
  --border: #a1a1aa;
  --border-card: #d4d4d8;
  --hover-bg: #f4f4f5;
  --accent: #0ea5e9;
  --accent-text: #0c4a6e;
  --accent-hover: #38bdf8;
  --green-bg: #dcfce7;
  --green-text: #16a34a;
  --green-ring: #22c55e;
  --green-dot: #22c55e;
  --linkedin: #0077b5;
  --radius: 0.5rem;
  --max-width: 65ch;
}

.dark {
  --bg: #09090b;
  --text: #e4e4e7;
  --text-secondary: #a1a1aa;
  --border: #52525b;
  --border-card: #3f3f46;
  --hover-bg: #18181b;
  --accent: #0ea5e9;
  --accent-text: #7dd3fc;
  --accent-hover: #0284c7;
  --green-bg: transparent;
  --green-text: #34d399;
  --green-ring: #10b981;
  --green-dot: #10b981;
  --linkedin: #e4e4e7;
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --bg: #09090b;
    --text: #e4e4e7;
    --text-secondary: #a1a1aa;
    --border: #52525b;
    --border-card: #3f3f46;
    --hover-bg: #18181b;
    --accent: #0ea5e9;
    --accent-text: #7dd3fc;
    --accent-hover: #0284c7;
    --green-bg: transparent;
    --green-text: #34d399;
    --green-ring: #10b981;
    --green-dot: #10b981;
    --linkedin: #e4e4e7;
  }
}

html {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 100%;
}

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  padding: 1.5rem;
  transition: background 0.2s, color 0.2s;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text);
}

.subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.bio {
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--text);
}

.links-card {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border-card);
}

.links-card .link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border-card);
  transition: background 0.15s;
}

.links-card .link-row:last-child {
  border-bottom: none;
}

.links-card .link-row:hover {
  background: var(--hover-bg);
}

.links-card .link-row:hover .arrow-icon {
  transform: rotate(45deg);
}

.links-card .link-row:hover .link-desc {
  opacity: 1;
}

.link-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.icon-linkedin {
  fill: var(--linkedin);
}

.icon-x .x-logo {
  fill: var(--text);
}

.arrow-icon {
  flex-shrink: 0;
  color: var(--text);
  transition: transform 0.15s;
}

.link-desc {
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity 0.15s;
  font-size: 0.875rem;
}

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

.email-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem;
  margin: -2rem;
  user-select: all;
  font-size: 0.875rem;
  color: var(--text);
}

.send-icon {
  color: var(--text);
  display: inline-flex;
  align-items: center;
}

.send-icon:hover {
  opacity: 0.7;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.875rem;
  color: var(--green-text);
  background: var(--green-bg);
  border: 1px solid var(--green-ring);
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--green-dot);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  text-underline-offset: 4px;
  transition: text-decoration 0.15s;
}

.footer-links a:hover {
  text-decoration: underline;
}

.tagline {
  color: var(--text);
  font-style: italic;
}

@media (max-width: 640px) {
  .link-desc {
    display: none;
  }

  .contact-section {
    flex-direction: column-reverse;
    align-items: center;
  }

  .email-block {
    justify-content: center;
  }
}