:root {
  --bg: #F9F6F2;
  --text: #1C1C1C;
  --muted: #7A7A7A;
  --teal: #6EC6C3;
  --lavender: #A39CFF;
  --mint: #C6E7D6;
  --lav-end: #E2E5FF;
  --black: #000000;
  --white: #FFFFFF;
  --card: #FFFFFF;
  --radius: 14px;
  --shadow: 0 10px 24px rgba(28,28,28,0.08);
  --shadow-soft: 0 6px 18px rgba(28,28,28,0.06);
  --maxw: 1100px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--text); text-decoration: none; }
a:hover {
  text-decoration: none; /* Remove underline globally */
}

header { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(120%) blur(6px); background: color-mix(in oklab, var(--bg) 88%, white 12%); border-bottom: 1px solid color-mix(in srgb, var(--muted) 20%, transparent); }
.nav { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -0.01em; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--mint), var(--lav-end)); display: grid; place-items: center; box-shadow: var(--shadow-soft); }
.brand-mark span { font-weight: 800; color: var(--text); }

.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { font-weight: 600; color: var(--text); opacity: 0.9; }
.nav-links a:hover { opacity: 1; }

.btn, button.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 10px 16px; font-weight: 600; border: 1px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; cursor: pointer; }
.btn-primary { background: var(--black); color: var(--white); box-shadow: var(--shadow-soft); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--teal); border-color: color-mix(in srgb, var(--teal) 55%, #0000 45%); }
.btn-outline:hover { background: color-mix(in srgb, var(--teal) 12%, transparent); }

a.btn:hover, button.btn:hover {
  text-decoration: none;
}

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(70% 60% at 70% 20%, color-mix(in srgb, var(--mint) 55%, transparent) 0%, transparent 60%),
              radial-gradient(60% 50% at 90% 0%, color-mix(in srgb, var(--lav-end) 60%, transparent) 0%, transparent 70%);
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  padding-top: 120px; /* Changed from margin-top to padding-top */
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 64px 20px; }

.kicker { color: var(--muted); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; margin: 10px 0 14px; letter-spacing: -0.01em; }
h1 .accent { color: var(--teal); text-decoration: underline 6px solid color-mix(in srgb, var(--teal) 35%, transparent); text-underline-offset: 4px; }
.lede { max-width: 60ch; color: var(--muted); font-size: 1.05rem; margin-bottom: 26px; }

/* Ensure hero text and lede have the same width */
.hero .lede {
  max-width: var(--maxw); /* Match the hero text width */
  margin: 0 auto; /* Center the text */
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

section { scroll-margin-top: 80px; }
.section { max-width: var(--maxw); margin: 0 auto; padding: 56px 20px; }
.section h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 18px; letter-spacing: -0.01em; }
.muted { color: var(--muted); }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 22px; }
.card p {
  font-size: 10pt; /* Further reduced font size for article summaries */
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px; /* Added margin for spacing */
}

.chip {
  background: color-mix(in srgb, var(--lavender) 16%, var(--white)); /* Default to purple background */
  border: 1px solid color-mix(in srgb, var(--lavender) 60%, transparent); /* Purple outline */
}

.chip.teal {
  background: color-mix(in srgb, var(--teal) 16%, var(--white)); /* Green background */
  border: 1px solid color-mix(in srgb, var(--teal) 60%, transparent); /* Green outline */
}

.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; }

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
  background: none;
  mask-image: none;
  -webkit-mask-image: none;
}
.timeline::before { content:""; position: absolute; left: 12px; top: 0; bottom: 0; width: 3px; background: color-mix(in srgb, var(--teal) 55%, white 45%); border-radius: 3px; }

/* Apply fade-out effect only to the last timeline line */
.t-item:last-child::before {
  content: "";
  position: absolute;
  left: 12px; /* Align with the timeline line */
  bottom: 0;
  width: 3px; /* Match the timeline width */
  height: 50px; /* Adjust height for the fade-out effect */
  background: linear-gradient(to bottom, var(--teal), transparent);
  z-index: 0; /* Ensure it does not affect content */
}

.t-item { position: relative; padding-left: 34px; }
.t-item::before { content:""; position: absolute; left: 6px; top: 12px; width: 15px; height: 15px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 25%, white); }
.t-item:last-child::before {
  content: none; /* Remove the dot for the last timeline entry */
}
.t-head { display:flex; align-items: baseline; gap: 10px; }
.t-role {
  color: var(--muted); /* Make company name slightly grayer */
  font-weight: 600;
}
.t-meta {
  color: var(--text); /* Make title darker */
  font-weight: 700;
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.p-card { display:flex; flex-direction: column; gap: 10px; transition: transform .18s ease, box-shadow .2s ease; border: 1px solid color-mix(in srgb, var(--muted) 16%, transparent); }
.p-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.p-title { font-weight: 700; }
.p-sub { color: var(--muted); font-size: .95rem; }
.p-underline { height: 3px; width: 42px; background: var(--teal); border-radius: 3px; }

.contact-band {
  background: radial-gradient(70% 60% at 70% 20%, color-mix(in srgb, var(--mint) 100%, transparent) 0%, transparent 60%),
              radial-gradient(60% 50% at 90% 0%, color-mix(in srgb, var(--lav-end) 100%, transparent) 0%, transparent 70%);
  max-width: none; /* Remove max width to revert to the previous style */
  margin: 0; /* Reset margin */
  border-radius: 24px;
  padding: 36px;
  display: grid;
  gap: 14px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.socials { display:flex; justify-content:center; gap: 10px; }
.icon-btn { display:inline-flex; align-items:center; gap: 10px; padding: 10px 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--muted) 20%, transparent); background: var(--white); font-weight: 600; }
.icon-btn:hover { background: color-mix(in srgb, var(--teal) 10%, white); }

footer { max-width: var(--maxw); margin: 0 auto; padding: 28px 20px 54px; color: var(--muted); }
footer p {
  text-align: center;
}
footer .rule { height: 1px; background: color-mix(in srgb, var(--teal) 30%, var(--bg)); margin-bottom: 18px; }

.publication {
  font-weight: bold;
  color: var(--muted); /* Grey color for publication */
}

.date {
  font-weight: normal;
  color: var(--muted); /* Grey color for date */
}

/* Restore original sub-card styles */
.sub-card {
  background: color-mix(in srgb, var(--muted) 10%, var(--white)); /* Slightly greyed background */
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
  font-size: 1em; /* Match the size of the blurb text */
}

/* Adjust 'Current Investments' styles */
.current-investments {
  display: block;
  margin-top: 16px; /* Adjust margin as needed */
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.8em; /* Made font size smaller */
  color: grey; /* Made text greyer */
}

/* Adjust margin below investment category title */
.sub-card strong {
  margin-bottom: 4px; /* Reduced margin below title */
  display: inline; /* Ensured icons and titles remain on the same line */
}

/* Restore investment badge styles */
.chips .chip {
  font-size: 0.85rem; /* Restore font size */
  border-radius: 999px; /* Restore rounded edges */
  padding: 6px 12px; /* Restore padding */
  background: color-mix(in srgb, var(--muted) 20%, var(--white)); /* Restore investment badge background */
  color: var(--text); /* Restore text color */
  box-shadow: var(--shadow-soft); /* Restore shadow */
}

/* Ensure skill badges remain distinct */
.timeline .chip {
  background: color-mix(in srgb, var(--lavender) 16%, var(--white)); /* Purple background */
  border: 1px solid color-mix(in srgb, var(--lavender) 60%, transparent); /* Purple outline */
}

.timeline .chip.teal {
  background: color-mix(in srgb, var(--teal) 16%, var(--white)); /* Green background */
  border: 1px solid color-mix(in srgb, var(--teal) 60%, transparent); /* Green outline */
}

/* Reduce font size for experience section bullet points */
.timeline ul.muted {
  font-size: 0.9rem; /* Reduced font size */
  line-height: 1.4; /* Adjusted line height for readability */
  margin-left: 0; /* Removed left margin */
  padding-left: 0; /* Removed padding for alignment */
}

/* Reduce margin below 'Investing and Consulting' */
#investor h2 {
  margin-bottom: 12px; /* Reduced margin below the section title */
}

/* Make the '...' in the experience section larger */
.t-item:last-child .t-role {
  font-size: 1.5rem; /* Increase font size */
  font-weight: bold; /* Make it stand out */
  text-align: center; /* Center the text */
}

/* Make 'Engineering Experience' appear in black */
#experience h2 {
  color: black; /* Set the color to black */
}

/* Make 'Publications' appear in black */
#publications h2 {
  color: black; /* Set the color to black */
}

@media (max-width: 980px) {
  .about { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .grid { grid-template-columns: 1fr; }
  .wrap { padding: 48px 20px; }
  .section { padding: 44px 20px; }
}