/* ============================================
   CALEB OH, MD — Personal Website Styles
   Dark minimal + Earth tone accents
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary: #0f0f0f;
  --bg-secondary: #161616;
  --bg-card: #1c1c1c;
  --text-primary: #e8e0d8;
  --text-secondary: #a09890;
  --text-muted: #6b6560;
  --accent: #c8956c;
  --accent-hover: #d4a67d;
  --accent-dim: rgba(200, 149, 108, 0.15);
  --border: #2a2a2a;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --max-width: 1100px;
  --nav-height: 70px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Utility ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background var(--transition);
}

.nav__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.nav__logo:hover {
  color: var(--accent);
}

.nav__menu {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav__link {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav__link:hover,
.nav__link.active {
  color: var(--accent);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero__greeting {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero__name {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.hero__accent {
  color: var(--accent);
}

.hero__tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 40px;
  letter-spacing: 0.03em;
}

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 4px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}

.btn--primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  transform: translateY(-1px);
}

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

.btn--outline:hover {
  background: var(--accent-dim);
  color: var(--accent-hover);
  transform: translateY(-1px);
}

/* ---------- Sections ---------- */
.section {
  padding: 100px 0;
}

.section--alt {
  background: var(--bg-secondary);
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background: var(--accent);
  margin-top: 12px;
}

.section__subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* ---------- About ---------- */
.about__content {
  margin-top: 32px;
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.about__image {
  width: 280px;
  height: 340px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.about__text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 16px;
  max-width: 650px;
}

.about__text p:last-child {
  margin-bottom: 0;
}

/* ---------- Research ---------- */
.research__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card__icon {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0.6;
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.card__desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- Philosophy ---------- */
.philosophy__content {
  margin-top: 32px;
  max-width: 700px;
}

.philosophy__content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.philosophy__content .btn {
  margin-top: 16px;
}

/* ---------- Links / Connect ---------- */
.links__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  transition: all var(--transition);
  text-align: center;
}

.link-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.link-card__icon {
  width: 32px;
  height: 32px;
}

.link-card__label {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Contact ---------- */
.contact__content {
  margin-top: 32px;
  max-width: 600px;
}

.contact__content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

/* ---------- Footer ---------- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer__socials {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.footer__socials a {
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
}

.footer__socials a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.footer__copy {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---------- Scroll Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 16px 0;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
  }

  .nav__menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav__menu li {
    width: 100%;
    text-align: center;
  }

  .nav__link {
    display: block;
    padding: 14px 24px;
  }

  .hero__cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .about__content {
    flex-direction: column;
  }

  .about__image {
    width: 100%;
    max-width: 300px;
    height: 280px;
  }

  .section {
    padding: 72px 0;
  }

  .research__grid {
    grid-template-columns: 1fr;
  }

  .links__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .links__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .link-card {
    padding: 24px 12px;
  }

  .hero__name {
    font-size: 2.2rem;
  }
}
