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

:root {
  --page-bg:    #0e0d0c;
  --card-bg:    #1a1917;
  --card-inner: #141312;
  --skill-bg:   rgb(63, 63, 70);
  --text:       #e8e4de;
  --muted:      #6b6760;
  --accent:     rgb(20, 172, 182);
  --accent-dim: rgba(20, 172, 182, 0.15);
  --accent-border: rgba(20, 172, 182, 0.35);
  --border:     rgba(255,255,255,0.07);
  --serif:      'Google Sans', 'Noto Sans', sans-serif;
  --body:       'Google Sans', 'Noto Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--page-bg);
  background-image:
    radial-gradient(ellipse 80% 40% at 30% -10%, rgba(20,172,182,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(0,0,0,0.35) 0%, transparent 70%);
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding: 40px 16px 80px;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,0.2);
  transition: text-decoration-color 0.2s;
}
a:hover { text-decoration-color: rgba(255,255,255,0.7); }

.page-card {
  max-width: 60%;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 2px 4px rgba(0,0,0,0.3),
    0 10px 40px rgba(0,0,0,0.4),
    0 30px 80px rgba(0,0,0,0.3);
  animation: cardIn 0.55s cubic-bezier(.22,1,.36,1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.top-area {
  padding: 28px 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-link { display: inline-block; text-decoration: none; }
.headshot {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(20,172,182,0.4);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  display: block;
}

.top-nav { display: flex; gap: 20px; align-items: center; }
.top-nav a {
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.top-nav a:hover { color: var(--text); }

.hero { padding: 36px 32px 32px; }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
  animation: fadeUp 0.5s 0.1s ease both;
}
.hero-sub {
  font-size: 1rem;
  color: #a8a49e;
  margin-bottom: 9px;
  animation: fadeUp 0.5s 0.18s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  animation: fadeUp 0.5s 0.25s ease both;
}
.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--card-inner);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem;
  color: #a8a49e;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  letter-spacing: 0.01em;
}
.social-pill:hover {
  background: var(--accent-dim);
  border-color: var(--accent-border);
  color: var(--accent);
  text-decoration: none;
}
.social-pill svg { flex-shrink: 0; }

.sections {
  padding: 0 18px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 3px 12px rgba(0,0,0,0.25);
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.card.visible { opacity: 1; transform: translateY(0); }

.card-header {
  padding: 18px 22px 15px;
  border-bottom: 1px solid var(--border);
}
.card-header h2 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.edu-row {
  display: flex;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.edu-row:last-child { border-bottom: none; }
.edu-row:hover { background: rgba(255,255,255,0.025); }
.edu-logo {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--card-inner);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  margin-top: 1px;
}
.edu-body { flex: 1; min-width: 0; }
.edu-title { font-size: 0.95rem; font-weight: 600; line-height: 1.4; margin-bottom: 3px; }
.edu-sub   { font-size: 0.88rem; color: #8a8680; margin-bottom: 3px; }
.edu-courses { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.edu-date  { font-size: 0.79rem; color: var(--muted); font-style: italic; margin-top: 4px; }

.exp-row {
  display: flex;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.exp-row:last-child { border-bottom: none; }
.exp-row:hover { background: rgba(255,255,255,0.025); }
.exp-logo {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--card-inner);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  margin-top: 1px;
}
.exp-body { flex: 1; min-width: 0; }
.exp-title { font-size: 0.95rem; font-weight: 600; line-height: 1.4; margin-bottom: 4px; color: var(--text); }
.exp-desc  { font-size: 0.9rem; color: #8a8680; line-height: 1.55; margin-bottom: 5px; }
.exp-desc ul { list-style: none; padding: 0; margin: 0; }
.exp-desc ul li { position: relative; padding-left: 14px; margin-bottom: 3px; }
.exp-desc ul li::before { content: '·'; position: absolute; left: 2px; color: var(--muted); }
.exp-date  { font-size: 0.79rem; color: var(--muted); font-style: italic; }

.project-row {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.project-row:last-child { border-bottom: none; }
.project-row:hover { background: rgba(255,255,255,0.025); }
.project-row h3 {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 500;
  margin-bottom: 5px;
  line-height: 1.35;
  color: var(--text);
}
.project-row h3 a { text-decoration: none; color: inherit; }
.project-row h3 a:hover { text-decoration: underline; }
.project-date { font-size: 0.79rem; color: var(--muted); font-style: italic; margin-bottom: 7px; }
.project-stack { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.tech-tag {
  font-size: 0.73rem;
  padding: 2px 9px;
  border-radius: 12px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  letter-spacing: 0.02em;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.project-desc { font-size: 0.9rem; color: #8a8680; line-height: 1.55; }
.project-desc ul { list-style: none; padding: 0; margin: 0; }
.project-desc ul li { position: relative; padding-left: 14px; margin-bottom: 3px; }
.project-desc ul li::before { content: '·'; position: absolute; left: 2px; color: var(--muted); }

.article-row {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  cursor: pointer;
}
.article-row:last-child { border-bottom: none; }
.article-row:hover { background: rgba(255,255,255,0.025); }
.article-row h3 { font-family: var(--serif); font-size: 1.08rem; font-weight: 500; margin-bottom: 4px; line-height: 1.35; }
.article-row h3 a { text-decoration: none; color: inherit; }
.article-row h3 a:hover { text-decoration: underline; }
.article-date { font-size: 0.79rem; color: var(--muted); font-style: italic; margin-bottom: 7px; }
.article-desc { font-size: 0.9rem; color: #8a8680; line-height: 1.55; margin-bottom: 9px; }
.read-link {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(20,172,182,0.35);
  transition: text-decoration-color 0.2s, opacity 0.2s;
}
.article-row:hover .read-link { text-decoration-color: var(--accent); opacity: 0.85; }

.skills-body { padding: 18px 22px; }
.skill-group { margin-bottom: 22px; }
.skill-group:last-child { margin-bottom: 0; }
.skill-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.skill-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 86px;
  height: 80px;
  border-radius: 10px;
  background: var(--card-inner);
  border: 1px solid rgba(255,255,255,0.07);
  cursor: default;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s cubic-bezier(.22,1,.36,1),
    box-shadow 0.22s ease;
}

.skill-card:hover {
  background: rgba(20, 172, 182, 0.3);
  border-color: rgba(20,172,182,0.6);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(20,172,182,0.3), 0 2px 6px rgba(0,0,0,0.3);
}

.skill-card img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.skill-card span {
  font-family: var(--body);
  font-size: 0.68rem;
  color: #8a8680;
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.2;
  transition: color 0.22s ease;
  padding: 0 4px;
}
.skill-card:hover span { color: #ffffff; }

.newsletter-card {
  background: var(--card-inner);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 3px 12px rgba(0,0,0,0.2);
  padding: 24px 22px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.newsletter-card.visible { opacity: 1; transform: translateY(0); }
.newsletter-card h2 { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; margin-bottom: 5px; }
.newsletter-card p { font-size: 0.9rem; color: var(--muted); margin-bottom: 16px; }
.nl-form { display: flex; gap: 8px; }
.nl-form input {
  flex: 1;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px;
  font-family: var(--body);
  font-size: 0.94rem;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.nl-form input::placeholder { color: #4a4845; }
.nl-form input:focus {
  border-color: rgba(20,172,182,0.5);
  box-shadow: 0 0 0 3px rgba(20,172,182,0.08);
}
.nl-form button {
  padding: 9px 20px;
  background: var(--skill-bg);
  color: var(--text);
  border: none;
  border-radius: 7px;
  font-family: var(--body);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  white-space: nowrap;
}
.nl-form button:hover { background: var(--accent); color: #fff; }
.nl-form button:active { transform: scale(0.97); }

footer { text-align: center; font-size: 0.8rem; color: var(--muted); padding: 4px 0 2px; }
footer a { color: var(--muted); }

@media (max-width: 500px) {
  body { padding: 0; }
  .page-card { border-radius: 0; box-shadow: none; min-height: 100vh; }
  .top-area  { padding: 20px 20px 0; }
  .hero      { padding: 28px 20px 24px; }
  .sections  { padding: 0 12px 24px; }
  .exp-row, .project-row, .article-row, .edu-row { padding: 14px 16px; }
  .card-header { padding: 16px 16px 13px; }
  .newsletter-card { padding: 20px 16px; }
  .skills-body { padding: 14px 16px; }
  .top-nav { display: none; }
  .skill-card { width: 76px; height: 72px; }
}
